A cluster configuration method, apparatus, device and medium

By configuring a virtual forwarding layer and a block forwarding aggregation layer in the unified storage system, the problem of concurrent access by multiple nodes in the unified storage system is solved, internal communication and load balancing are achieved, and the availability of the system is improved.

CN116401227BActive Publication Date: 2025-10-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310396875.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2025-10-24
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

In the existing technology, the unified storage system cannot achieve multi-node concurrent access, and the distributed file system has cumbersome communication between multiple sites.

Method used

By creating a network-attached storage cluster in the unified storage system, configuring the virtual forwarding layer and block forwarding aggregation layer to achieve internal communication, and controlling access requests by mounting points on the master node, the block forwarding aggregation layer is used for data processing.

Benefits of technology

It realizes concurrent access and load balancing based on the local file system, avoids data conflicts caused by multi-node parallel access, and improves system availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116401227B_ABST
    Figure CN116401227B_ABST
Patent Text Reader

Abstract

The application discloses a cluster configuration method and device, equipment and medium, and relates to the field of computers.The method comprises the following steps: creating a network attached storage cluster comprising a plurality of target nodes configured with network attached storage services, and configuring a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for splitting and aggregating public volumes of the file system in each target node; mounting the network attached storage service in the master node determined from the target nodes as a mounting point of the local file system; when a non-mounting point receives a protocol access request, applying for access right to the master node by using the virtual forwarding layer in the corresponding target node, forwarding the request to the master node after the access right is obtained, and controlling the master node to forward the request to a target processing node determined from the slave target nodes for processing by the block forwarding aggregation layer. The application can realize concurrent access and load balancing based on the local file system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a cluster configuration method, device, equipment and medium. Background Art

[0002] In existing technologies, unified storage combines SAN (Storage Area Network) and NAS (Network Attached Storage) into a single system, sharing the SAN software stack. This simplifies block device management and reduces the entire IO (Input / Output) path. It also reduces network deployment, equipment, and subsequent maintenance costs between NAS and SAN. Compared to distributed NAS, unified storage offers the advantages of single-site (dual-node) deployment, low minimum configuration requirements, and low maintenance costs. However, unified storage is mostly based on local file systems, with nodes being independent systems. Simultaneous access by multiple nodes is not possible, and a single file system cannot utilize the performance of all nodes.

[0003] Currently, a distributed file system is generally used for concurrent access, but this method is only suitable for multi-site situations. A separate external network is required for communication between sites, so it is relatively cumbersome.

[0004] As can be seen from the above, in the application process of the file system, how to efficiently implement concurrent access is a problem to be solved in this field. Summary of the Invention

[0005] In view of this, the present invention aims to provide a cluster configuration method, apparatus, device, and medium that can communicate via internal links of a unified storage system and achieve concurrent access and load balancing based on a local file system. The specific solution is as follows:

[0006] In a first aspect, the present application discloses a cluster configuration method, comprising:

[0007] Creating a network-attached storage cluster comprising a plurality of target nodes configured with a network-attached storage service, and configuring in each of the target nodes a virtual forwarding layer for forwarding file system information within the network-attached storage cluster and a block forwarding aggregation layer for performing segmentation and aggregation operations on a public volume of the file system;

[0008] Mounting the network attached storage service in the master node determined from the target node as a mount point of the local file system;

[0009] When a non-mount point receives a protocol access request, the non-mount point applies for access right to a virtual forwarding layer in a target node corresponding to the non-mount point, forwards the protocol access request to the master node after obtaining the access right, and controls the master node to forward the protocol access request to a target processing node determined from the target node through a block forwarding aggregation layer for processing.

[0010] Optionally, a network attached storage cluster containing a plurality of target nodes configured with network attached storage services is created, including:

[0011] A network attached storage cluster containing a plurality of target nodes running network attached storage services in the form of containers or in the form of kernel-based virtual machines is created.

[0012] The forwarding of the protocol access request to the master node after obtaining the access right includes:

[0013] The protocol access request is converted into a file system request after obtaining the access right.

[0014] The file system request is forwarded to the master node.

[0015] Optionally, after the creation of the network attached storage cluster containing a plurality of target nodes configured with network attached storage services, the method further includes:

[0016] A public volume mapped to the network attached storage services in the target nodes is created in a storage area network.

[0017] Correspondingly, the determination of the master node from the target nodes includes:

[0018] A first target volume is determined from the public volume, and a master node uniquely designated for the first target volume is determined from all the target nodes.

[0019] After the creation of the public volume mapped to the network attached storage services in the target nodes in the storage area network, the method further includes:

[0020] Cluster information and file system information are written in the public volume, and an arbitration space for write contention by the target nodes is created; the cluster information includes a cluster name and node names in the cluster sorted according to node unique codes of the nodes, and the file system information includes a file system unique code, a file system name, a mount point, a universally unique identifier of the file system, a public volume name sorted according to a universally unique identifier of the public volume, and a partition size of the public volume.

[0021] Optionally, before the master node forwards the protocol access request to the target processing node for processing through the block forwarding and aggregation layer, the method further comprises:

[0022] controlling the block forwarding and aggregation layer in the master node to perform spatial segmentation and aggregation on the common volume according to a preset spatial aggregation method, to determine an aggregated virtual node containing a metadata space; wherein the metadata space is used to record a mapping relationship between an aggregated space in the aggregated virtual node and an actual space in the common volume before aggregation, and a node name of the aggregated node.

[0023] Optionally, the controlling the master node to forward the protocol access request to the target processing node for processing comprises:

[0024] controlling the master node to determine a target common volume corresponding to the protocol access request based on the mapping relationship recorded in the aggregated virtual node, and to determine a preferential access node uniquely designated for the target common volume from all the target nodes;

[0025] determining a busy degree of the preferential access node;

[0026] when the busy degree does not satisfy a preset busy condition, taking the preferential access node as a target processing node to perform disk writing processing on data corresponding to the protocol access request;

[0027] when the busy degree satisfies the preset busy condition, determining a target processing node from the target nodes other than the preferential access node uniquely designated for the target common volume, and forwarding the protocol access request to the target processing node for disk writing processing.

[0028] In a second aspect, the present application discloses a cluster configuration device, comprising:

[0029] a cluster creation module configured to create a network attached storage cluster containing a plurality of target nodes configured with a network attached storage service, and to configure a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding and aggregation layer for performing segmentation and aggregation operations on a common volume of the file system in each of the target nodes;

[0030] a system mounting module configured to mount the network attached storage service in a master node determined from the target nodes as a mounting point of a local file system;

[0031] The request processing module is configured to, when a non-mount point receives a protocol access request, apply for access right to the main node by using a virtual forwarding layer in a target node corresponding to the non-mount point, forward the protocol access request to the main node after obtaining the access right, and control the main node to forward the protocol access request to a target processing node determined from the target node through the block forwarding aggregation layer for processing; wherein the non-mount point is a network attached storage service in a target node other than the main node.

[0032] In a third aspect, the present application discloses an electronic device, comprising:

[0033] A memory for saving a computer program;

[0034] A processor for executing the computer program to implement the cluster configuration method.

[0035] In a fourth aspect, the present application discloses a computer storage medium for saving a computer program; wherein the computer program is executed by a processor to implement the steps of the cluster configuration method disclosed above.

[0036] The application first creates a network attached storage cluster containing a plurality of target nodes configured with network attached storage services, and configures a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on a common volume of a file system in each of the target nodes; mounts the network attached storage service in a master node determined from the target nodes as a mounting point of a local file system; when a non-mounting point receives a protocol access request, applies for access right to the master node by using the virtual forwarding layer in the target node corresponding to the non-mounting point, forwards the protocol access request to the master node after obtaining the access right, and controls the master node to forward the protocol access request to a target processing node determined from the target nodes by using the block forwarding aggregation layer for processing; wherein the non-mounting point is the network attached storage service in a target node other than the master node. In this way, in the embodiment, NAS is used, and based on a unified storage system, an external network does not need to be created for each site to communicate, and each node can communicate internally through the internal link of the unified storage system to form a NAS cluster and provide NAS services externally through the business resources, a virtual forwarding layer for forwarding file system information within the NAS cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on a common volume of a file system are added in the nodes, and after the NAS service in the priority access node is mounted as a mounting point, the mounting point controls all protocol access processes, concurrent access of any local file system can be realized, concurrent access and load balancing based on the local file system on the unified storage NAS can be realized by using the virtual forwarding layer and the block forwarding aggregation layer, data conflicts caused by parallel access of multiple nodes are prevented, and the availability is relatively strong. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on the provided drawings.

[0038] Figure 1 A cluster configuration method flowchart is provided for the present application.

[0039] Figure 2 A NAS cluster schematic diagram is provided for the present application.

[0040] Figure 3 A specific cluster configuration method flowchart is provided for the present application.

[0041] Figure 4A public volume space structure schematic diagram provided for the present application;

[0042] Figure 5 A public volume segmentation and aggregation operation schematic diagram provided for the present application;

[0043] Figure 6 A whole structure schematic diagram provided for the present application;

[0044] Figure 7 A whole structure schematic diagram provided for the present application;

[0045] Figure 8 A cluster configuration device structure schematic diagram provided for the present application;

[0046] Figure 9 An electronic equipment structure diagram provided for the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.

[0048] In the prior art, using the unified storage mode has the advantages of low configuration and low maintenance cost, but it cannot realize concurrent access. Using the distributed file system can realize concurrent access, but this mode is suitable for the case of multiple sites, and separate external networks are needed for communication between sites, which is relatively cumbersome. The cluster configuration method in the present application can use the internal link of the unified storage system for communication, and realize concurrent access and load balancing based on the local file system.

[0049] The embodiment of the present application discloses a cluster configuration method, which refers to Figure 1 The method comprises the following steps:

[0050] Step S11: creating a network attached storage cluster containing a plurality of target nodes configured with a network attached storage service, and configuring a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for segmentation and aggregation operation on the public volume of the file system in each target node.

[0051] In the embodiment, the creating of the network attached storage cluster containing a plurality of target nodes configured with a network attached storage service can comprise: creating the network attached storage cluster containing a plurality of target nodes running the network attached storage service in the form of a container or in the form of a kernel-based virtual machine.

[0052] The embodiment adopts a unified storage manner to construct a NAS cluster. Specifically, each node contains an independent NAS service, which contains a SAN connection, a block device, a file system, a protocol, a network, and a cluster management service. Taking a two-node example, both nodes run the NAS service in the form of a container or a KVM (kernel-based virtual machine). The nodes can directly communicate and transmit data through the internal link of the unified storage cluster.

[0053] It should be noted that the NAS service can be deployed in a KVM, a virtual container, an independent host, or a public (private) cloud. The backend can be connected to multiple independent SANs, but the volumes need to be shared on the NAS nodes that need to access the file system in parallel. For example, Figure 2 Fig. 1 shows a NAS cluster diagram, which shows two NAS cluster examples. The four target nodes on the top of the diagram form a NAS cluster, in which node1 and node2 use the FS1 (FS: File System) file system and are connected to SAN1; node3 and node4 use the FS2 file system and are connected to SAN2. The two target nodes node1 and node2 on the bottom of the diagram form a NAS cluster, which uses the FS1 file system and is connected to SAN1 and SAN2 through a switch or FC.

[0054] In the embodiment, a virtual forwarding layer for forwarding file system information within the network-attached storage cluster is added to the file system layer of each target node. Specifically, the virtual forwarding layer is a kernel module that directly accesses the local file system in the kernel state to accelerate IO access.

[0055] Step S12: mounting the network-attached storage service in the master node determined from the target nodes as a mounting point of the local file system.

[0056] In the embodiment, the master node is determined from all target nodes, and the NAS service in the master node is mounted as a mounting point of the local file system. The NAS service in each target node in the embodiment can also be a NAS node. That is, in a specific implementation, the NAS node in the master node can be mounted as a mounting point of the local file system, and the network-attached storage service in the target node other than the master node can be a non-mounting point.

[0057] It should be noted that the mounting point is used to actually mount the local file system, the non-mounting point can be virtually mounted on the mounting point by the virtual forwarding layer, but the local file system is not mounted. And in a specific embodiment, the virtual forwarding layer is compatible with VFS (i.e. Virtual File System) operation, and the shared protocol can directly access the virtual forwarding layer.

[0058] Step S13: When the non-mounting point receives the protocol access request, the virtual forwarding layer in the target node corresponding to the non-mounting point is used to apply for access right to the master node, and when the access right is obtained, the protocol access request is forwarded to the master node, and the master node is controlled to forward the protocol access request to the target processing node determined from the target node through the block forwarding aggregation layer for processing; wherein the non-mounting point is a network attached storage service in other target nodes except the master node.

[0059] It should be noted that in this embodiment, when the mounting point receives the protocol access request, i.e. the NAS service in the master node receives the protocol access request, the protocol access request is directly issued to the local file system for processing.

[0060] In this embodiment, when the access right is obtained, the protocol access request can be converted into a file system request, and the file system request can be forwarded to the master node.

[0061] In this embodiment, when the NAS service in the target node other than the master node receives a protocol access request, the virtual forwarding layer in the target node corresponding to the non-mount point applies for access right to the master node, and after obtaining the access right, forwards the protocol access request to the master node for processing. That is, when the non-mount point receives a protocol access request, it cannot process the request, and needs to forward the protocol access request to the master file system corresponding to the mount point after converting it into a local file system request, and process it through the master node. That is, the virtual forwarding layer of the mount point controls the access to the real local file system. When accessing, the forwarding layer on the NAS node where the master file system is located maintains the access right to the file system, and all nodes must obtain the access right to the accessed content on the NAS node where the master file system is located before performing request forwarding processing, to prevent data conflicts caused by parallel access. Specifically, the master node may obtain multiple protocol access requests sent by target nodes at the same time, at which time each node may compete for access right to the same location, and the priority access node must ensure that only one node has access right to the same location at the same time. In addition, a preset time can also be set, and the node must obtain the access right to the accessed content on the NAS node where the master file system is located within the preset time after obtaining the access right to the accessed content on the NAS node where the master file system is located.

[0062] In the embodiment, a network attached storage cluster containing a plurality of target nodes configured with network attached storage services is first created, and a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on the common volumes of the file system are configured in each of the target nodes; the network attached storage service in a master node determined from the target nodes is mounted as a mounting point of a local file system; when a non-mounting point receives a protocol access request, the virtual forwarding layer in the target node corresponding to the non-mounting point is used to apply for access right to the master node, and after the access right is obtained, the protocol access request is forwarded to the master node, and the master node is controlled to forward the protocol access request to a target processing node determined from the target nodes through the block forwarding aggregation layer for processing; wherein the non-mounting point is the network attached storage service in a target node other than the master node. In this way, in the embodiment, NAS is used, and based on the unified storage system, an external network does not need to be created for each site to communicate, and each node can communicate internally through the internal link of the unified storage system to form a NAS cluster and provide NAS services externally through the business resources, a virtual forwarding layer for forwarding file system information within the NAS cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on the common volumes of the file system are added in the nodes, and after the NAS service in the priority access node is mounted as a mounting point, the protocol access process is controlled by the mounting point, concurrent access of any local file system can be implemented, concurrent access and load balancing based on the local file system on the unified storage NAS can be implemented by using the virtual forwarding layer and the block forwarding aggregation layer, data conflicts caused by parallel access of multiple nodes can be prevented, and the availability is relatively strong.

[0063] Figure 3 A specific cluster configuration method flowchart is provided for the embodiment of the application. Referring to FIG. 21, Figure 3 the method comprises the following steps:

[0064] Step S21: a network attached storage cluster containing a plurality of target nodes configured with network attached storage services is created, and a common volume mapped to the network attached storage service in the target node is created in the storage area network, and then a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on the common volumes of the file system are configured in each of the target nodes.

[0065] In the embodiment, the NAS service can access the SAN mapped volume lun simultaneously, for example, the public volume lun1 can be mapped to vdisk1, the public volume lun2 can be mapped to vdisk2, the NAS service between nodes can form a NAS cluster, and when the NAS cluster is created, a common volume such as lun-c can be created on the SAN and mapped to the NAS service (NAS node) of two nodes node1 and node2 in the cluster. After the NAS cluster is created, the master node is determined according to the ID (Identity document, unique code) size of the SAN node, for example, node1.

[0066] In the embodiment, after the common volume mapped to the network attached storage service in the target node is created in the storage area network, the cluster information and the file system information can be written in the common volume, and an arbitration space for write contention of the target node is created; wherein the cluster information includes the cluster name and the node name in the cluster sorted according to the node unique code of the target node, and the file system information includes the file system unique code, the file system name, the mounting point, the universally unique identifier of the file system, the common volume name sorted according to the universally unique identifier of the common volume, and the split size of the common volume. For example, Figure 4 As shown in a common volume space structure diagram provided by the application, the common volume is composed of cluster information, arbitration space and file system information. The cluster information, including the cluster name and the node name sorted according to the node ID, can be directly written in the common volume. A random arbitration number is generated, and written in the arbitration space after synchronization of each node is completed. When the file system is created, the file system information, including the file system ID, the file system name, the mounting point, the universally unique identifier of the file system, the lun name sorted according to the UUID of the common volume lun, and the split size of the lun, is written in the common volume. In a specific implementation scenario, the file system related information can be:

[0067] ID: 1

[0068] name: fs1

[0069] mpoint: / run / fs / fs1

[0070] UUID: 94a549bc43b7*...

[0071] lun: 5c69aaaa000000000000001; 5c69aaaa000000000000006

[0072] strip: 125K.

[0073] That is, the file system ID is 1, the file system name is fs1, the mounting point is / run / fs / fs1, the file system UUID is 94a549bc43b7*...., the lun name sorted according to the UUID of the lun is 5c69aaaa000000000000001 and 5c69aaaa000000000000006, and the split size of the lun is 125K.

[0074] In a specific embodiment, the NAS services between nodes can also share the SAN internal network for heartbeat transmission. Specifically, when the heartbeats between the NAS nodes are disconnected, the common volume can be used as an arbitration disk to arbitrate through the write-in contention of the arbitration space between the nodes. For example, when the heartbeats between two nodes are disconnected, each NAS node performs read-write arbitration space after delaying its order in the cluster by 5ms. The written value is the value synchronized in the cluster + a random number that is not 0. When the read-in value is the same as the value synchronized in the cluster, it indicates that the other node has not written, and then the node performs write-in and updates the information in the cluster to take over the business. The node that has not won performs self-restart to try to repair the environment.

[0075] In this embodiment, a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on the common volume of the file system are configured in each of the target nodes. It can be understood that the virtual forwarding layer is used to forward file system information within the network attached storage cluster, and the block forwarding aggregation layer is used to perform splitting and aggregation operations on the common volume of the file system. In addition, a local file system layer and a block management layer can also be configured, the virtual forwarding layer accesses the local file system layer below to complete interaction, and the block management layer is used to work with the block forwarding aggregation layer.

[0076] In this embodiment, each file system can correspond to multiple common volumes, and a unique corresponding priority access node needs to be specified for each volume, which is the node with the fastest access speed to the current volume. It is recommended to create no less than the number of nodes of volumes under this system to realize parallel access to the disk of the nodes to speed up the file system access speed.

[0077] Step S22: determining a first target volume from the common volume, and determining a master node uniquely specified for the first target volume from all the target nodes, and then mounting the network attached storage service in the master node determined from the target nodes as a mounting point of the local file system.

[0078] In the embodiment, the first target volume is determined from the common volume, and a priority access node uniquely designated for the first target volume is determined from all the target nodes, i.e., the master node is determined, and then the network attached storage service in the master node is mounted as a mounting point of the local file system.

[0079] In the embodiment, the determining the first target volume from the common volume includes determining a common volume with the highest priority as the first target volume. In a specific implementation, the first volume in the common volume, i.e., the volume with ID 1, can be determined as the first target volume. Then, the master node is the priority access node uniquely corresponding to the common volume with the highest priority.

[0080] In the embodiment, before the protocol access request is forwarded to the master node after the access right is acquired, and the protocol access request is forwarded to the target processing node determined from the target nodes by the block forwarding aggregation layer in the master node for processing, the block forwarding aggregation layer in the master node can further perform spatial segmentation and aggregation on the common volume according to a preset spatial aggregation method to determine an aggregated virtual node containing a metadata space. The metadata space is used to record the mapping relationship between the aggregated space in the aggregated virtual node and the actual space in the common volume before aggregation and the node name of the aggregated node.

[0081] It can be understood that the aggregated space in the aggregated virtual node is a virtual space, the space in the common volume before aggregation is an actual space, and the metadata space records the mapping relationship between the virtual space and the actual space. The node of the aggregated node can be denoted as vblock, which is used to provide access to the local system and is consistent with the ordinary volume layer in use. Specifically, the node name can be named in the form of fsname+fs UUID.

[0082] In a specific implementation, the preset spatial aggregation method can be a method of reserving a corresponding size of metadata space after the first volume, segmenting the remaining space according to a preset size, and then performing cross allocation for spatial aggregation. Figure 5As shown, lun1 and lun2 are common volumes before aggregation, vblock is a virtual node after aggregation, vblock metadata is a metadata space in the figure, the metadata space is pre-divided in lun1, then the remaining space in lun1 is divided into lun1.1, lun1.2…lun1.N, lun2 is directly divided into lun2.1, lun2.2…lun2.N, each space after division is aggregated into vblock metadata, lun1.1, lun2.1…lun1.N, lun2.N according to the principle of cross allocation, and finally aggregated into vblock.

[0083] In this embodiment, the virtual forwarding layer can find the first volume's priority access node by reading the information in the file system in the common volume, and take the NAS node on this node as the mounting point of the file system, and truly mount the local file system. The NAS node on the priority access node of the other volume can virtually mount the file system on the mounting point through the virtual forwarding layer, but the local file system is not mounted.

[0084] Step S23: When the non-mounting point receives a protocol access request, the virtual forwarding layer in the target node corresponding to the non-mounting point is used to apply for access right to the master node, and when the access right is obtained, the protocol access request is forwarded to the master node, and the master node is controlled to forward the protocol access request to the target processing node determined from the target node through the block forwarding aggregation layer for processing; wherein the non-mounting point is a network attached storage service in other target nodes except the master node.

[0085] In the embodiment, the control of the master node forwarding the protocol access request to the target processing node for processing through the block forwarding aggregation layer can include: controlling the master node to determine the target common volume corresponding to the protocol access request based on the mapping relationship recorded in the aggregated virtual node, and determining the priority access node uniquely specified for the target common volume from all the target nodes; determining the busy degree of the priority access node; when the busy degree does not satisfy the preset busy condition, taking the priority access node as the target processing node to perform the disk landing processing on the data corresponding to the protocol access request; and when the busy degree satisfies the preset busy condition, determining the target processing node from the nodes other than the priority access node uniquely specified for the target common volume among all the target nodes, and forwarding the protocol access request to the target processing node for disk landing processing. That is, in the embodiment, the priority access node of the target common volume corresponding to the protocol access request is the preferred target processing node, but considering that the node can have a high busy degree, in the embodiment, when the node has a high busy degree, other nodes need to be selected as the target processing node for data disk landing, so as to ensure that the node for disk landing has the highest disk landing efficiency.

[0086] As described above, the priority access node is a node uniquely specified for the target common volume, and in a specific implementation, a priority access node corresponding to each volume can be set. In the embodiment, when access is performed, the block forwarding aggregation layer can find the position of the real target common volume according to the mapping relationship in the block metadata space, judge the best disk landing path of the volume and the busy degree of the corresponding priority access node, so as to judge whether to perform data disk landing locally or forward the data to another node for disk landing. For the data to be forwarded, the priority access node corresponding to the volume is preferentially selected, and then the task amount is judged, so as to select the optimal access node. In a specific implementation, the busy degree can be determined based on the cpu and iowait values of the node, and the preset busy condition can be generated based on the preset cpu and iowait threshold values.

[0087] In addition, in the embodiment, when the master node is determined to be faulty by the cluster, the NAS cluster selects the priority access node of the next volume of the file system to mount the local file system, the node becomes a temporary master node, and the network and shared configuration of the original master node are migrated to provide access to the outside. During this period, the access permission of the forwarding layer is invalid, the access queue is emptied, and the access request is blocked, and when the temporary master node is switched, the access right is re-contended. When the original master node recovers and joins the cluster, the forwarding layer blocks the access request and empties the access right. The temporary master node unmounts the local file system and removes the network and shared related configurations, and performs configuration on the original master node.

[0088] Figure 6 This is a schematic diagram of the overall structure proposed by the present invention. In the figure, host1 and host2 are clients, which interact with node1 and node2 in the NAS cluster through eth. NAS services are configured in both node1 and node2. The disk and vdisk below realize the interaction between SAN and NAS. vdisk1 and vdisk2 have a corresponding relationship with the public volume lun1 and public volume lun2 in the NAS cluster. In the figure, block is the block forwarding aggregation layer and block management layer of the present invention. FS1 is the virtual forwarding layer and local file system layer. NFS (Network File System) and SMB (Server Message Block) are shared services implemented on FS1. In addition, the NAS services in the two nodes can perform heartbeat transmission through vnet, and vswitch is used to forward heartbeat information between nodes. Figure 7 For Figure 6 A corresponding overall structural diagram, in the figure, FS1-VFL is the above-mentioned virtual forwarding layer in the present invention, FS1 is the local file system layer, block is the above-mentioned block forwarding aggregation layer and block management layer, and the bidirectional arrows of FS1-VFL of node1 and node2 in the figure represent the mutual forwarding process of information, and the vblock of node1 pointing to the vblock of node2 indicates that node1 as the master node forwards data to node2 so that node2 can write the data to the disk.

[0089] The embodiment proposes a whole model of unified storage NAS cluster deployment, and concurrent access control of the file system is completed through protocol conversion in the virtual file system forwarding layer and forwarding to the file system master NAS node; the virtual file system presents as an independent file system of the node, but the real file system is on the master NAS node, and access of all nodes needs to compete for access right to the file system master node, and only one node has access right to the same location at the same time; after the node gets the access right, the forwarding layer converts the protocol request into a local request, and forwards it to the file system master node, which will download the data to the block forwarding aggregation layer; the block forwarding aggregation layer aggregates the volumes allocated to the file system according to the specified size, and generates a virtual node after aggregation; when receiving a data request, the block forwarding aggregation layer will find the corresponding real target common volume location according to the mapping relationship in the block metadata, and judge the busy degree of the optimal access node of the target common volume, and after determining the optimal processing node, the data is forwarded to the optimal access node for data flushing. The concurrent access method of the local file system in the unified storage NAS cluster in the embodiment is not dependent on the type of the local file system, and has universal applicability. The aggregation and forwarding of the block distribute the access to the data to different common volumes, improving the throughput.

[0090] Referring to Figure 8 The embodiment of the application discloses a cluster configuration device, which can specifically include:

[0091] The cluster creation module 11 is configured to create a network attached storage cluster containing a plurality of target nodes configured with a network attached storage service, and configure a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for segmenting and aggregating a common volume of the file system in each target node.

[0092] The system mounting module 12 is configured to mount the network attached storage service in the master node determined from the target nodes as a mounting point of a local file system.

[0093] The request processing module 13 is configured to, when a non-mounting point receives a protocol access request, apply for access right to the master node by using the virtual forwarding layer in the target node corresponding to the non-mounting point, forward the protocol access request to the master node after obtaining the access right, and control the master node to forward the protocol access request to a target processing node determined from the target nodes by the block forwarding aggregation layer for processing; wherein the non-mounting point is the network attached storage service in the other target node except the master node.

[0094] The embodiment first creates a network attached storage cluster containing a plurality of target nodes configured with network attached storage services, and configures a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on a common volume of a file system in each of the target nodes; mounts the network attached storage service in a master node determined from the target nodes as a mounting point of a local file system; when a non-mounting point receives a protocol access request, applies for access right to the master node by using the virtual forwarding layer in the target node corresponding to the non-mounting point, forwards the protocol access request to the master node after the access right is obtained, and controls the master node to forward the protocol access request to a target processing node determined from the target nodes by using the block forwarding aggregation layer for processing. The non-mounting point is the network attached storage service in the target node other than the master node. In this way, in the embodiment, NAS is used, and based on the unified storage system, an external network does not need to be created for each site to communicate, and each node can communicate internally through the internal link of the unified storage system to form a NAS cluster and provide NAS services externally through the business resources. The virtual forwarding layer for forwarding file system information within the NAS cluster and the block forwarding aggregation layer for performing splitting and aggregation operations on a common volume of a file system are added in the nodes, and after the NAS service in the priority access node is mounted as a mounting point, the mounting point controls all protocol access processes, concurrent access of any local file system can be implemented, concurrent access and load balancing based on the local file system on the unified storage NAS can be implemented by using the virtual forwarding layer and the block forwarding aggregation layer, data conflicts caused by parallel access of multiple nodes are prevented, and the availability is relatively strong.

[0095] In some specific embodiments, the cluster creation module 11 comprises:

[0096] A cluster creation unit is configured to create a network attached storage cluster containing a plurality of target nodes running network attached storage services in the form of containers or in the form of kernel-based virtual machines.

[0097] In some specific embodiments, the request processing module 13 comprises:

[0098] A request escaping unit is configured to escape the protocol access request into a file system request after the access right is obtained.

[0099] A request forwarding unit is configured to forward the file system request to the master node for processing.

[0100] In some specific embodiments, the cluster configuration device further comprises:

[0101] A public volume creating unit is configured to create a public volume mapped to the network attached storage service in the target node in the storage area network.

[0102] Correspondingly, the system mounting module 12 comprises:

[0103] A first target volume is determined from the public volume, and a master node uniquely designated for the first target volume is determined from all the target nodes.

[0104] In some embodiments, the cluster configuration device further comprises:

[0105] An information writing unit is configured to write cluster information and file system information in the public volume, and create an arbitration space for write contention of the target nodes; wherein the cluster information comprises a cluster name and node names in the cluster sorted according to node unique codes of the target nodes, and the file system information comprises a file system unique code, a file system name, a mounting point, a universally unique identifier of the file system, a public volume name sorted according to a universally unique identifier of the public volume, and a split size of the public volume.

[0106] In some embodiments, the node configuration module 12 comprises:

[0107] A node configuration unit is configured to configure a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding and aggregation layer for split and aggregation operations on the public volume of the file system in each of the target nodes.

[0108] Correspondingly, the cluster configuration device further comprises:

[0109] A split and aggregation unit is configured to control the block forwarding and aggregation layer in the master node to perform spatial split and aggregation on the public volume according to a preset spatial aggregation method, to determine an aggregated virtual node containing a metadata space; wherein the metadata space is used to record a mapping relationship between an aggregated space in the aggregated virtual node and an actual space in the public volume before aggregation, and a node name of the aggregated node.

[0110] In some embodiments, the request processing module 13 comprises:

[0111] An access right obtaining unit is configured to forward the protocol access request to the master node when the access right is obtained.

[0112] A node determining unit is configured to control the master node to determine a target public volume corresponding to the protocol access request based on the mapping relationship recorded in the aggregated virtual node, and determine a priority access node uniquely designated for the target public volume from all the target nodes.

[0113] a busy degree determination unit configured to determine a busy degree of the priority access node;

[0114] a first processing unit configured to, when the busy degree does not satisfy a preset busy condition, take the priority access node as a target processing node to perform disk writing processing on data corresponding to the protocol access request;

[0115] a second processing unit configured to, when the busy degree satisfies the preset busy condition, determine a target processing node from all the target nodes except the priority access node uniquely designated by the target common volume, and forward the protocol access request to the target processing node for disk writing processing.

[0116] Further, the embodiment of the present application further discloses an electronic device, Figure 9 is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the present application.

[0117] Figure 9 A structural schematic diagram of an electronic device 20 provided by the embodiment of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input / output interface 25, a communication interface 26 and a communication bus 27. The memory 22 is used to store a computer program, the computer program is loaded and executed by the processor 21 to realize the related steps in the cluster configuration method disclosed in any of the preceding embodiments. In addition, the electronic device 20 in the embodiment can be an electronic computer.

[0118] In the embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 26 can be any communication protocol applicable to the technical solution of the present application, which is not limited here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited here.

[0119] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0120] The operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. The computer program 222 can further include computer programs capable of accomplishing other specific work in addition to the computer programs capable of accomplishing the cluster configuration method disclosed by the electronic device 20 in any of the foregoing embodiments.

[0121] Further, the application also discloses a computer readable storage medium, which includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, magnetic disk or optical disk, or any other form of storage medium known in the technical field. The computer program is executed by the processor to implement the cluster configuration method disclosed above. The specific steps of the method can refer to the corresponding content disclosed in the foregoing embodiments, which will not be described here.

[0122] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can refer to the method part. Professionals can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.

[0123] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.

[0124] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be used to distinguish one entity or action from another entity or action, without necessarily requiring or implying that there is any such actual relationship or order between these entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements does not include only those elements, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0125] The cluster configuration method, apparatus, device, and storage medium provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples in this document. The above description of the embodiments is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description should not be understood as a limitation on the present application.

Claims

1. A cluster configuration method, characterized by, Applied to a unified storage system, comprising: creating a network attached storage cluster containing a plurality of target nodes configured with network attached storage services, and configuring a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding aggregation layer for performing splitting and aggregation operations on a common volume of a file system in each of the target nodes; mounting the network attached storage service in a master node determined from the target nodes as a mount point of a local file system; when a non-mount point receives a protocol access request, applying for access right to the master node by using the virtual forwarding layer in the target node corresponding to the non-mount point, forwarding the protocol access request to the master node after obtaining the access right, and controlling the master node to forward the protocol access request to a target processing node determined from the target nodes through the block forwarding aggregation layer for processing; wherein the non-mount point is the network attached storage service in a target node other than the master node.

2. The cluster configuration method of claim 1, wherein, The creating a network attached storage cluster containing a plurality of target nodes configured with network attached storage services comprises: creating a network attached storage cluster containing a plurality of target nodes running network attached storage services in the form of containers or in the form of kernel-based virtual machines.

3. The cluster configuration method of claim 1, wherein, The forwarding the protocol access request to the master node after obtaining the access right comprises: escaping the protocol access request into a file system request after obtaining the access right; forwarding the file system request to the master node.

4. The cluster configuration method according to any one of claims 1 to 3, characterized in that, After the creating a network attached storage cluster containing a plurality of target nodes configured with network attached storage services, further comprising: creating a common volume in a storage area network mapped to the network attached storage service in the target nodes; Correspondingly, the determining a master node from the target nodes comprises: determining a first target volume from the common volume, and determining a master node uniquely designated for the first target volume from all the target nodes.

5. The cluster configuration method of claim 4, wherein, After the creating a common volume in a storage area network mapped to the network attached storage service in the target nodes, further comprising: writing cluster information and file system information in the common volume, and creating an arbitration space for the target nodes to perform write contention; wherein the cluster information includes a cluster name and node names of nodes in the cluster sorted according to node unique codes of the nodes, and the file system information includes a file system unique code, a file system name, a mount point, a universally unique identifier of the file system, a common volume name sorted according to a universally unique identifier of the common volume, and a splitting size of the common volume.

6. The cluster configuration method of claim 4, wherein, Before the forwarding the protocol access request to the master node after obtaining the access right, and controlling the master node to forward the protocol access request to a target processing node determined from the target nodes through the block forwarding aggregation layer for processing, further comprising: controlling the block forwarding and aggregation layer in the master node to spatially segment and aggregate the common volumes according to a preset spatial aggregation method to determine an aggregated virtual node containing metadata space; wherein the metadata space is used to record a mapping relationship between aggregated space in the aggregated virtual node and actual space in the common volumes before aggregation and a node name of the aggregated node.

7. The cluster configuration method of claim 6, wherein, controlling the master node to forward the protocol access request to a target processing node for processing via the block forwarding and aggregation layer, including: controlling the master node to determine a target common volume corresponding to the protocol access request based on the mapping relationship recorded in the aggregated virtual node, and to determine a preferential access node uniquely designated in advance for the target common volume from all the target nodes; determining a busy degree of the preferential access node; when the busy degree does not satisfy a preset busy condition, taking the preferential access node as a target processing node to perform disk writing processing on data corresponding to the protocol access request; when the busy degree satisfies the preset busy condition, determining a target processing node from all the target nodes except the preferential access node uniquely designated for the target common volume, and forwarding the protocol access request to the target processing node for disk writing processing.

8. A cluster configuration apparatus characterized by comprising: application to a unified storage system, including: a cluster creation module configured to create a network attached storage cluster containing a plurality of target nodes configured with a network attached storage service, and to configure a virtual forwarding layer for forwarding file system information within the network attached storage cluster and a block forwarding and aggregation layer for segmenting and aggregating common volumes of a file system in each of the target nodes; a system mounting module configured to mount a network attached storage service in a master node determined from the target nodes as a mounting point of a local file system; a request processing module configured to, when a protocol access request is received by a non-mounting point, apply for access right to the master node by the virtual forwarding layer in a target node corresponding to the non-mounting point, forward the protocol access request to the master node after obtaining the access right, and control the master node to forward the protocol access request to a target processing node determined from the target nodes via the block forwarding and aggregation layer for processing; wherein the non-mounting point is a network attached storage service in a target node other than the master node.

9. An electronic device, comprising: including a processor and a memory; wherein the processor executes a computer program saved in the memory to implement the cluster configuration method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, for storing a computer program; wherein the computer program is executed by a processor to implement the cluster configuration method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Managing file system namespace in network attached storage (NAS) cluster

    US10552072B1

  • Locality aware load balancing of IO paths in multipathing software

    US20200348860A1