Node deletion method and device, computer equipment and storage medium

By detecting and determining the causes of abnormal nodes, using virtual machine management list and target management network information to accurately delete target nodes in the software-defined storage domain, solving the problem of node abnormalities in the cloud computing management platform and ensuring the normal operation of the storage domain .

CN119166276APending Publication Date: 2024-12-20JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411178079.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the software-defined storage domain of the cloud computing management platform, node exceptions lead to problems that cannot be deleted, affecting the normal operation of the storage domain.

Method used

By detecting the normality of nodes in the software-defined storage domain, determine the cause of abnormal nodes, and accurately delete the target node in the storage domain based on the reasons, including obtaining the virtual machine management list, determining the target management network information, detecting deletion conditions, and disconnecting resource associations. and delete target resources.

Benefits of technology

It realizes accurate deletion of abnormal nodes under various reasons, solves the problem that target nodes cannot be deleted in the existing technology, and ensures the normal operation of the storage domain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166276A_ABST
    Figure CN119166276A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of node deletion, in particular to a node deletion method and device, computer equipment and a storage medium. Detecting whether each node in the software defined storage domain is normal or not; if the abnormal target node exists, detecting the reason for the abnormality of the target node; and deleting the target node in the software defined storage domain according to the reason for the abnormality of the target node. Therefore, the accuracy of deleting the target node in the software defined storage domain is ensured. Therefore, the target node to be deleted can be deleted under various reasons that the target node is abnormal. According to the method and the device, the problem that the to-be-deleted target node cannot be deleted under many conditions in the prior art is solved, and the abnormal target node is deleted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of node deletion, and in particular to a node deletion method, device, computer equipment and storage medium. Background Art

[0002] SDS storage domain (software defined storage domain) plays an important role in the cloud computing management platform. It consists of system virtual machines on each node and is used to provide storage services.

[0003] When an abnormal situation occurs on a node and the node needs to be removed, some problems may cause the node to be unable to be deleted, thus affecting the normal operation of the SDS storage domain.

[0004] Therefore, how to delete abnormal nodes has become an urgent problem to be solved. Summary of the invention

[0005] In view of this, the present invention provides a node deletion method, apparatus, computer equipment and storage medium to solve the problem of how to delete abnormal nodes.

[0006] In a first aspect, the present invention provides a node deletion method, the method comprising:

[0007] Check whether each node in the software-defined storage domain is normal;

[0008] If there is an abnormal target node, detect the cause of the abnormality of the target node;

[0009] Delete the target node in the software-defined storage domain based on the cause of the target node exception.

[0010] The embodiment of the present application provides a node deletion method, which detects whether each node in the software-defined storage domain is normal, and ensures the accuracy of the detection result. If there is an abnormal target node, the cause of the abnormality of the target node is detected to ensure the accuracy of the detected cause of the abnormality of the target node. According to the cause of the abnormality of the target node, the target node is deleted in the software-defined storage domain, thereby ensuring the accuracy of deleting the target node in the software-defined storage domain. Furthermore, it can be achieved that the target node to be deleted can be deleted under various reasons for the abnormality of such a target node. It solves the problem in the prior art that the target node to be deleted cannot be deleted in many cases, and realizes the deletion of the abnormal target node.

[0011] In an optional implementation, the reason why the target node is abnormal includes deletion of a target virtual machine corresponding to the target node, and deleting the target node in the software defined storage domain according to the reason why the target node is abnormal includes:

[0012] Obtain a virtual machine management list from a preset storage location; the virtual machine management list includes the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine; the virtual machine management list is generated after the software-defined storage domain is deployed;

[0013] Determine the target management network information corresponding to the target virtual machine according to the management network information corresponding to each virtual machine, and determine the target node to be deleted according to the target management network information;

[0014] Check whether the target node meets the deletion conditions;

[0015] If the target node meets the deletion condition, the target node is deleted in the software-defined storage domain.

[0016] An embodiment of the present application provides a node deletion method, which obtains a virtual machine management list from a preset storage location, ensures the accuracy of the obtained virtual machine management list, and avoids the inability to delete the target node due to the inability to obtain the virtual machine management list. The target management network information corresponding to the target virtual machine is determined according to the management network information corresponding to each virtual machine, thereby ensuring the accuracy of the determined target management network information. The target node to be deleted is determined according to the target management network information, thereby ensuring the accuracy of the determined target node to be deleted. Whether the target node meets the deletion condition is detected, thereby ensuring the accuracy of the obtained detection result. If the target node meets the deletion condition, the target node is deleted in the software-defined storage domain, thereby ensuring the accuracy of deleting the target node in the software-defined storage domain and avoiding erroneous deletion of the target node.

[0017] In an optional implementation, detecting whether the target node satisfies the deletion condition includes:

[0018] Get the target data corresponding to the target node;

[0019] Searching for target data in other nodes of the software-defined storage domain except the target node;

[0020] If the target data is found in other nodes, the first resource occupancy corresponding to the target data is obtained;

[0021] Obtain the total resource usage corresponding to the software-defined storage domain; the total resource usage includes the resource usage corresponding to each node in the software-defined storage domain;

[0022] Subtract the first resource occupancy from the total resource occupancy to obtain the current actual resource occupancy;

[0023] Obtaining total available storage resources corresponding to the software-defined storage domain and a first available storage resource corresponding to the target node;

[0024] Subtracting the first available storage resource from the total available storage resources to obtain remaining available storage resources;

[0025] Compare the current actual resource usage with the remaining available storage resources;

[0026] If the current actual resource usage is less than the remaining available storage resources, it is determined that the target node meets the deletion condition;

[0027] If the current actual resource usage is equal to or greater than the remaining available storage resources, it is determined that the target node does not meet the deletion condition.

[0028] The embodiment of the present application provides a node deletion method, which obtains the target data corresponding to the target node; searches for the target data in other nodes of the software-defined storage domain except the target node; if the target data is found in other nodes, obtains the first resource occupancy corresponding to the target data, and obtains the total resource occupancy corresponding to the software-defined storage domain; subtracts the first resource occupancy from the total resource occupancy to obtain the current actual resource occupancy, thereby ensuring the accuracy of the calculated current actual resource occupancy. Obtain the total available storage resources corresponding to the software-defined storage domain and the first available storage resources corresponding to the target node, subtract the first available storage resources from the total available storage resources to obtain the remaining available storage resources, thereby ensuring the accuracy of the calculated remaining available storage resources. Compare the current actual resource occupancy with the remaining available storage resources; if the current actual resource occupancy is less than the remaining available storage resources, determine that the target node meets the deletion condition, thereby ensuring the accuracy of the result that the determined target node meets the deletion condition. If the current actual resource occupancy is equal to or greater than the remaining available storage resources, determine that the target node does not meet the deletion condition, thereby ensuring the accuracy of the result that the determined target node does not meet the deletion condition.

[0029] In an optional implementation, if the target node meets the deletion condition, deleting the target node in the software defined storage domain includes:

[0030] Disassociate the target resource on the target node with other preset resources in the software-defined storage domain;

[0031] Delete the target resource corresponding to the target node in the software-defined storage domain.

[0032] The embodiment of the present application provides a node deletion method, which removes the association relationship between the target resource on the target node and other preset resources in the software-defined storage domain, thereby avoiding the inability to delete the target resource corresponding to the target node due to the association relationship between the target resource and other preset resources. Then, the target resource corresponding to the target node is deleted in the software-defined storage domain, thereby achieving the deletion of the target node in the software-defined storage domain.

[0033] In an optional embodiment, the method further includes:

[0034] Periodically detect the current number of nodes corresponding to the software-defined storage domain;

[0035] Compare the current number of nodes with the historical number of nodes in the virtual machine management list;

[0036] If the current number of nodes is inconsistent with the historical number of nodes, the historical number of nodes in the virtual machine management list is updated according to the current number of nodes.

[0037] The embodiment of the present application provides a node deletion method, which periodically detects the current number of nodes corresponding to the software-defined storage domain; compares the current number of nodes with the historical number of nodes in the virtual machine management list, and ensures the accuracy of the comparison result. If the current number of nodes is inconsistent with the historical number of nodes; the historical number of nodes in the virtual machine management list is updated according to the current number of nodes, thereby ensuring the accuracy of the updated historical number of nodes.

[0038] In an optional embodiment, the method further includes:

[0039] Periodically detect the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine;

[0040] Compare the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list;

[0041] If the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list;

[0042] Then, according to the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine, the information in the virtual machine management list is updated.

[0043] The embodiment of the present application provides a node deletion method, which periodically detects the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine; compares the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list, and ensures the accuracy of the comparison result. If the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list; then according to the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine, the information in the virtual machine management list is updated, thereby ensuring the accuracy of the information in the virtual machine management list, and then it can be ensured that each node is processed based on the information in the updated virtual machine management list.

[0044] In an optional implementation manner, the reason why the target node is abnormal includes that the target node is abnormal, and according to the reason why the target node is abnormal, deleting the target node in the software defined storage domain includes:

[0045] Control the monitoring service task running on the target node to stop; the monitoring service task is used to monitor the target node and / or the target virtual machine corresponding to the target node;

[0046] Find the association information between the target node and the target virtual machine;

[0047] Delete the association information between the target node and the target virtual machine, and delete the target resource corresponding to the target node in the software-defined storage domain.

[0048] The embodiment of the present application provides a node deletion method, which controls the monitoring service task running on the target node to stop, thereby avoiding the monitoring service task running on the target node from reporting an error. The association information between the target node and the target virtual machine is found; the association information between the target node and the target virtual machine is deleted, and the target resource corresponding to the target node is deleted in the software-defined storage domain, thereby realizing the deletion of the target node in the software-defined storage domain.

[0049] In a second aspect, the present invention provides a node deletion device, comprising:

[0050] The first detection module is used to detect whether each node in the software-defined storage domain is normal;

[0051] The second detection module is used to detect the cause of the abnormality of the target node if there is an abnormal target node;

[0052] The deletion module is used to delete the target node in the software-defined storage domain according to the reason why the target node is abnormal.

[0053] The embodiment of the present application provides a node deletion device, which detects whether each node in the software-defined storage domain is normal, and ensures the accuracy of the detection result. If there is an abnormal target node, the cause of the abnormality of the target node is detected, and the accuracy of the detected cause of the abnormality of the target node is ensured. According to the cause of the abnormality of the target node, the target node is deleted in the software-defined storage domain, thereby ensuring the accuracy of deleting the target node in the software-defined storage domain. Furthermore, it can be achieved that the target node to be deleted can be deleted under various reasons for the abnormality of such a target node. It solves the problem in the prior art that the target node to be deleted cannot be deleted in many cases, and realizes the deletion of the abnormal target node.

[0054] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the node deletion method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0055] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the node deletion method of the first aspect or any corresponding embodiment thereof.

[0056] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the node deletion method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 is a schematic flow chart of a node deletion method according to an embodiment of the present invention;

[0059] Figure 2 is a flowchart of another node deletion method according to an embodiment of the present invention;

[0060] Figure 3 is a flowchart of another node deletion method according to an embodiment of the present invention;

[0061] Figure 4is a structural block diagram of a node deletion device according to an embodiment of the present invention;

[0062] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0064] DS (Software Defined Storage) storage domain plays a vital role in the cloud computing management platform. It can provide storage resources to the outside world according to actual needs. SDS is usually composed of system virtual machines (SCVMs) on each node in the cluster that constitutes the SDS under the management platform. Each SCVM has a large-capacity disk and a high-speed network card, which can provide better and faster storage services.

[0065] When a node in the SDS has insufficient capacity or needs to be replaced with another node, the SDS node removal function can be used. However, in some cases, the ordinary node removal function may be restricted by node attributes, such as the number of master nodes must not be less than 3. When a node in the SDS fails (such as the host is offline or the SCVM on it is offline), the forced SDS node removal function can be used. However, when most or all of the nodes in the entire SDS are in a faulty state, the ordinary node removal function may not be available, and the node needs to be forcibly removed. However, there is also a worst case scenario, that is, the SCVM component resources have been cleaned up (possibly due to customer misoperation), but the node still exists in the SDS. Since deleting the node requires executing relevant cleanup commands on other nodes and issuing the SCVM management network IP on the node, but since the SCVM has been deleted, forced removal cannot be performed. The usual solution is to find relevant records (such as database log records, but there is a risk of log loss) to obtain the management network login-related information of the SCVM, and then issue commands on other nodes for manual cleanup. If the relevant records cannot be found, resources may not be cleaned up.

[0066] Therefore, how to delete abnormal nodes has become an urgent problem to be solved.

[0067] It should be noted that the node deletion method provided in the embodiment of the present application may be executed by a node deletion device, which may be implemented as part or all of an electronic device by software, hardware, or a combination of software and hardware, wherein the electronic device may be any node in a software-defined storage domain. In the following method embodiments, the execution subject is an electronic device as an example for explanation.

[0068] According to an embodiment of the present invention, a node deletion method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0069] In this embodiment, a node deletion method is provided, which can be used in the above electronic device. Figure 1 is a flowchart of a node deletion method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0070] Step S101, detecting whether each node in the software defined storage domain is normal.

[0071] Optionally, the electronic device can use monitoring tools to monitor key system indicators of each node in the software-defined storage domain, and then determine whether each node is normal based on the key system indicators. Among them, the key system indicators may include CPU utilization, memory usage, disk I / O, network bandwidth, etc.

[0072] Optionally, the electronic device may detect whether the data on each node is consistent by comparing data copies on each node, performing data checksums, or using data verification tools, and determine the node with inconsistent data as the target node where the abnormality occurs.

[0073] Step S102: If there is an abnormal target node, the cause of the abnormality of the target node is detected.

[0074] The reason why the target node is abnormal may include that the target node itself is abnormal and the target virtual machine corresponding to the target node is deleted.

[0075] Optionally, if there is an abnormal target node, the electronic device can check the monitoring data and logs of the target node to check whether the cause of the abnormality of the target node is an abnormality of the target node itself. For example, hardware failure, system error, process crash, etc. Optionally, the electronic device can also check the resource usage of the target node, such as CPU, memory, disk, etc. If the resource usage is abnormally high or fluctuates abnormally, it may be that the target node itself is abnormal.

[0076] Optionally, if there is an abnormal target node, the electronic device can also check the log of the virtual machine management system to see if there is a record of deleting the target virtual machine. If so, it is determined that the cause of the abnormality of the target node is the deletion of the target virtual machine corresponding to the target node.

[0077] Optionally, the electronic device may also check the state of the target virtual machine in the virtual machine management system. If the virtual machine is marked as deleted or does not exist, then it is determined that the cause of the abnormality of the target node is that the target virtual machine corresponding to the target node is deleted.

[0078] Optionally, if the virtual machine status is displayed as running or in other normal status, but the target node is abnormal, it is determined that the target node itself is abnormal.

[0079] Step S103: Deleting the target node in the software defined storage domain according to the reason why the target node is abnormal.

[0080] Specifically, after determining the cause of the abnormality of the target node, the electronic device can delete the target node in the software-defined storage domain according to a preset deletion policy.

[0081] The node deletion method provided in this embodiment detects whether each node in the software-defined storage domain is normal, thereby ensuring the accuracy of the detection result. If there is an abnormal target node, the cause of the abnormality of the target node is detected, thereby ensuring the accuracy of the detected cause of the abnormality of the target node. According to the cause of the abnormality of the target node, the target node is deleted in the software-defined storage domain, thereby ensuring the accuracy of deleting the target node in the software-defined storage domain. Furthermore, it can be achieved that the target node to be deleted can be deleted under various reasons for the abnormality of such a target node. It solves the problem in the prior art that the target node to be deleted cannot be deleted in many cases, and realizes the deletion of the abnormal target node.

[0082] In this embodiment, a node deletion method is provided, which can be used in the above electronic device. Figure 2 is a flowchart of a node deletion method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0083] Step S201, detecting whether each node in the software defined storage domain is normal.

[0084] For details about this step, please refer to the above description of step S101, which will not be elaborated here.

[0085] Step S202: If there is an abnormal target node, the cause of the abnormality of the target node is detected.

[0086] For details about this step, please refer to the above description of step S102, which will not be elaborated here.

[0087] Step S203: Deleting the target node in the software defined storage domain according to the reason why the target node is abnormal.

[0088] Specifically, the reason why the target node is abnormal includes that the target virtual machine corresponding to the target node is deleted, and the above step S203 may include the following steps:

[0089] Step S2031, obtaining a virtual machine management list from a preset storage location.

[0090] The virtual machine management list includes the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine. The virtual machine management list is generated after the software-defined storage domain is deployed.

[0091] Specifically, after the software-defined storage domain is deployed, the electronic device can obtain the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine, generate a virtual machine management list, and save the virtual machine management list backup to a preset storage location.

[0092] Therefore, when the electronic device determines that the reason why the abnormality of the target node occurs is that the target virtual machine corresponding to the target node is deleted, the electronic device can obtain the virtual machine management list from the preset storage location.

[0093] Step S2032: determine the target management network information corresponding to the target virtual machine according to the management network information corresponding to each virtual machine, and determine the target node to be deleted according to the target management network information.

[0094] Specifically, the electronic device can determine the target management network information corresponding to the target virtual machine according to the management network information corresponding to each virtual machine, and then determine the target node to be deleted according to the corresponding relationship between each node and each virtual machine and the target management network information corresponding to the target virtual machine.

[0095] Step S2033, detecting whether the target node meets the deletion condition.

[0096] Specifically, the above step S2033 may include the following steps:

[0097] Step a1, obtaining target data corresponding to the target node.

[0098] Specifically, the electronic device may identify the target data stored on the target node, thereby acquiring the target data corresponding to the target node.

[0099] Step a2: Search for target data in other nodes of the software defined storage domain except the target node.

[0100] Specifically, after the electronic device obtains the target data corresponding to the target node, the electronic device may search for the target data in other nodes in the software-defined storage domain except the target node.

[0101] Step a3: if the target data is found in other nodes, the first resource occupancy corresponding to the target data is obtained.

[0102] Specifically, if the target data is found in other nodes, the electronic device may count the resources occupied by the target data, thereby determining the first resource occupation amount corresponding to the target data.

[0103] Step a4, obtaining the total resource usage corresponding to the software-defined storage domain.

[0104] The total resource usage includes the resource usage corresponding to each node in the software-defined storage domain.

[0105] Specifically, the electronic device may also obtain each node included in the software-defined storage domain, then obtain the resource occupation corresponding to each node, and then add up the resource occupation corresponding to each node to calculate the total resource occupation corresponding to the software-defined storage domain.

[0106] Step a5: subtract the first resource occupancy from the total resource occupancy to obtain the current actual resource occupancy.

[0107] Specifically, the electronic device may subtract the first resource occupancy from the total resource occupancy to obtain the current actual resource occupancy.

[0108] Step a6, obtaining the total available storage resources corresponding to the software-defined storage domain and the first available storage resource corresponding to the target node.

[0109] Specifically, the electronic device may obtain the available storage resources corresponding to each node in the software-defined storage domain. Then, the available storage resources corresponding to each node are added together to calculate the total available storage resources. The electronic device also needs to obtain the first available storage resource corresponding to the target node.

[0110] Step a7: subtract the first available storage resource from the total available storage resources to obtain remaining available storage resources.

[0111] Specifically, the electronic device may subtract the first available storage resource from the total available storage resources to obtain the remaining available storage resources.

[0112] Step a8: compare the current actual resource usage with the remaining available storage resources.

[0113] Specifically, the electronic device compares the current actual resource occupancy with the remaining available storage resources.

[0114] Step a9: If the current actual resource usage is less than the remaining available storage resources, it is determined that the target node meets the deletion condition.

[0115] Specifically, if the current actual resource occupancy is less than the remaining available storage resources, it is determined that the target node meets the deletion condition.

[0116] Step a10: If the current actual resource occupancy is equal to or greater than the remaining available storage resources, it is determined that the target node does not meet the deletion condition.

[0117] Specifically, if the current actual resource occupancy is equal to or greater than the remaining available storage resources, the electronic device determines that the target node does not meet the deletion condition.

[0118] In another optional implementation of the present application, if the target data is not found in other nodes, the electronic device obtains the total resource occupancy corresponding to the software-defined storage domain, and determines the total resource occupancy as the current actual resource occupancy. Then, the total available storage resources corresponding to the software-defined storage domain and the first available storage resource corresponding to the target node are obtained. The remaining available storage resources are obtained by subtracting the first available storage resource from the total available storage resources; the current actual resource occupancy is compared with the remaining available storage resources; if the current actual resource occupancy is less than the remaining available storage resources, it is determined that the target node meets the deletion condition; if the current actual resource occupancy is equal to or greater than the remaining available storage resources, it is determined that the target node does not meet the deletion condition.

[0119] For example, assume that the software-defined storage domain includes 3 nodes, the available storage resources corresponding to the first node are 20G, the available storage resources corresponding to the second node are 30G, and the available storage resources corresponding to the third node are 40G. Among them, the first node is the target node, then the total available storage resources corresponding to the software-defined storage domain are 90G, and the first available storage resource corresponding to the target node is 20G. Among them, the first resource occupancy corresponding to the target data stored in the target node is 14G. The total resource occupancy is 80G.

[0120] The electronic device searches for the target data in other nodes of the software-defined storage domain except the target node. If the target data is found in other nodes, it is determined that the target data has been migrated from the target node to other nodes. Therefore, the total resource usage corresponding to the current software-defined storage domain includes the first resource usage corresponding to the two target data. Therefore, the electronic device uses the total resource usage 80G minus the first resource usage 14G to obtain the current actual resource usage of 66G.

[0121] The electronic device uses the total available storage resource 90G minus the first available storage resource 20G to obtain the remaining available storage resource of 70G. If the current actual resource occupancy is less than the remaining available storage resource, it is determined that the target node meets the deletion condition.

[0122] If the electronic device does not find the target data in other nodes, it is determined that the target data has not been migrated from the target node to other nodes. Therefore, before deleting the target node, the target data needs to be migrated from the target node to other nodes. Therefore, the total resource occupancy of 80G corresponding to the software-defined storage domain is the current actual resource occupancy. The electronic device uses the total available storage resources 90G minus the first available storage resource 20G to obtain the remaining available storage resources of 70G. If the current actual resource occupancy is greater than the remaining available storage resources, it is determined that the target node does not meet the deletion conditions.

[0123] Step S2034: If the target node meets the deletion condition, the target node is deleted in the software defined storage domain.

[0124] Specifically, the above step S2034 may include the following steps:

[0125] Step b1, disassociate the target resource on the target node with other preset resources in the software-defined storage domain.

[0126] Specifically, the electronic device may determine a specific association mode between the target resource on the target node and other preset resources, which may involve associations in aspects such as storage volumes, network connections, and configuration files.

[0127] The electronic device can then use an appropriate management tool or interface to log in to the management system of the software-defined storage domain. In the management interface, find the target resource on the target node and select the specific resource to be disassociated. According to the function of the management tool, perform the corresponding operation to disassociate the target resource from other preset resources. This may include deleting the associated configuration, disconnecting the network connection, releasing the storage volume, etc. After performing the disassociation operation, the electronic device can check the relevant configuration information, resource status, or perform a test to verify the effect of the disassociation and confirm that the association has been successfully disassociated. Then, perform cleanup and update operations as needed, such as deleting configuration files that are no longer needed, updating resource lists, etc.

[0128] Step b2: Delete the target resource corresponding to the target node in the software defined storage domain.

[0129] Specifically, the electronic device may first find the target resource corresponding to the target node, and then delete the target resource corresponding to the target node.

[0130] In an optional implementation manner of the present application, the following steps may also be included:

[0131] Step c1, periodically detecting the current number of nodes corresponding to the software-defined storage domain.

[0132] Specifically, the electronic device may periodically identify each node in the software-defined storage domain, count each node, and obtain the current number of nodes corresponding to the software-defined storage domain.

[0133] Step c2, comparing the current number of nodes with the historical number of nodes in the virtual machine management list.

[0134] Specifically, the electronic device may periodically obtain the virtual machine management list from a preset storage location, and read the number of historical nodes in the virtual machine management list, and then compare the current number of nodes with the number of historical nodes in the virtual machine management list.

[0135] Step c3: If the current number of nodes is inconsistent with the historical number of nodes, the historical number of nodes in the virtual machine management list is updated according to the current number of nodes.

[0136] Specifically, if the current number of nodes is inconsistent with the historical number of nodes, the electronic device determines the newly added nodes or deleted nodes in the software-defined storage domain according to the corresponding current nodes in the software-defined storage domain.

[0137] If a new node in the software-defined storage domain is determined, then after the electronic device determines the new node, management network information corresponding to the new node can be added to the virtual machine management list.

[0138] If the deleted node in the software-defined storage domain is determined, the electronic device may delete the management network information corresponding to the deleted node in the virtual machine management list.

[0139] In an optional implementation manner of the present application, the following steps may also be included:

[0140] Step d1, periodically detecting the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine.

[0141] Specifically, the electronic device can periodically identify each node in the software-defined storage domain and determine each virtual machine corresponding to each node, thereby determining the corresponding relationship between each node and each virtual machine. Then, the electronic device identifies each virtual machine corresponding to each node and determines the management network information corresponding to each virtual machine.

[0142] Step d2, comparing the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list.

[0143] Specifically, the electronic device may compare the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list.

[0144] Step d3, if the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list, then the information in the virtual machine management list is updated according to the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine.

[0145] Specifically, if the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list, the electronic device can update the information in the virtual machine management list based on the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine, thereby ensuring the accuracy of the information in the virtual machine management list.

[0146] The embodiment of the present application provides a node deletion method, which obtains a virtual machine management list from a preset storage location, ensures the accuracy of the obtained virtual machine management list, and avoids the inability to delete the target node due to the inability to obtain the virtual machine management list. Determine the target management network information corresponding to the target virtual machine according to the management network information corresponding to each virtual machine, and ensure the accuracy of the determined target management network information. Determine the target node to be deleted according to the target management network information, thereby ensuring the accuracy of the determined target node to be deleted. Obtain the target data corresponding to the target node; search for the target data in other nodes other than the target node in the software-defined storage domain; if the target data is found in other nodes, obtain the first resource occupancy corresponding to the target data, and obtain the total resource occupancy corresponding to the software-defined storage domain; use the total resource occupancy to subtract the first resource occupancy to obtain the current actual resource occupancy, and ensure the accuracy of the calculated current actual resource occupancy. Obtain the total available storage resources corresponding to the software-defined storage domain and the first available storage resources corresponding to the target node, and use the total available storage resources to subtract the first available storage resources to obtain the remaining available storage resources, and ensure the accuracy of the calculated remaining available storage resources. The current actual resource usage is compared with the remaining available storage resources; if the current actual resource usage is less than the remaining available storage resources, the target node is determined to meet the deletion condition, ensuring the accuracy of the result that the target node meets the deletion condition. If the current actual resource usage is equal to or greater than the remaining available storage resources, the target node is determined not to meet the deletion condition, ensuring the accuracy of the result that the target node does not meet the deletion condition.

[0147] If the target node meets the deletion condition, the association relationship between the target resource on the target node and other preset resources in the software-defined storage domain is removed, thereby avoiding the inability to delete the target resource corresponding to the target node due to the association relationship between the target resource and other preset resources. Then, the target resource corresponding to the target node is deleted in the software-defined storage domain, thereby realizing the deletion of the target node in the software-defined storage domain.

[0148] In addition, the current number of nodes corresponding to the software-defined storage domain is periodically detected; the current number of nodes is compared with the historical number of nodes in the virtual machine management list to ensure the accuracy of the comparison result. If the current number of nodes is inconsistent with the historical number of nodes, the historical number of nodes in the virtual machine management list is updated according to the current number of nodes, thereby ensuring the accuracy of the updated historical number of nodes.

[0149] Periodically detect the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine; compare the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list to ensure the accuracy of the comparison result. If the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list; then update the information in the virtual machine management list based on the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine, thereby ensuring the accuracy of the information in the virtual machine management list, and then ensuring that each node is processed based on the information in the updated virtual machine management list.

[0150] In this embodiment, a node deletion method is provided, which can be used in the above electronic device. Figure 3 is a flowchart of a node deletion method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0151] Step S301, detecting whether each node in the software defined storage domain is normal.

[0152] For details about this step, please refer to the above description of step S201, which will not be elaborated here.

[0153] Step S302: If there is an abnormal target node, the cause of the abnormality of the target node is detected.

[0154] For details about this step, please refer to the above description of step S202, which will not be elaborated here.

[0155] Step S303: Delete the target node in the software defined storage domain according to the reason why the target node is abnormal.

[0156] Specifically, the reason why the target node is abnormal includes that the target node is abnormal. The above step S303 may include the following steps:

[0157] Step S3031, controlling the monitoring service task running on the target node to stop.

[0158] The monitoring service task is used to monitor the target node and / or the target virtual machine corresponding to the target node.

[0159] Optionally, the electronic device can use a command line tool to send a stop command to the monitoring service task. The specific command and operation method depend on the implementation of the monitoring service and the operating system used.

[0160] Optionally, the electronic device may also use a corresponding API call to stop the monitoring service task.

[0161] Step S3032, searching for association information between the target node and the target virtual machine.

[0162] Specifically, the electronic device may search for association information between the target node and the target virtual machine in the software-defined storage domain.

[0163] Step S3033: Delete the association information between the target node and the target virtual machine, and delete the target resource corresponding to the target node in the software defined storage domain.

[0164] Specifically, the electronic device may delete the association information between the target node and the target virtual machine, and delete the target resource corresponding to the target node in the software-defined storage domain.

[0165] The embodiment of the present application provides a node deletion method, which controls the monitoring service task running on the target node to stop, thereby avoiding the monitoring service task running on the target node from reporting an error. The association information between the target node and the target virtual machine is found; the association information between the target node and the target virtual machine is deleted, and the target resource corresponding to the target node is deleted in the software-defined storage domain, thereby realizing the deletion of the target node in the software-defined storage domain.

[0166] In the present embodiment, a node deletion device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0167] This embodiment provides a node deletion device, such as Figure 4 As shown, including:

[0168] The first detection module 401 is used to detect whether each node in the software-defined storage domain is normal;

[0169] The second detection module 402 is used to detect the cause of the abnormality of the target node if there is an abnormal target node;

[0170] The deletion module 403 is used to delete the target node in the software defined storage domain according to the reason why the target node is abnormal.

[0171] In some optional implementations, the cause of the abnormality of the target node includes deletion of the target virtual machine corresponding to the target node, and the deletion module 403 is specifically used to obtain a virtual machine management list from a preset storage location; the virtual machine management list includes the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine; the virtual machine management list is generated after the software-defined storage domain is deployed; the target management network information corresponding to the target virtual machine is determined according to the management network information corresponding to each virtual machine, and the target node to be deleted is determined according to the target management network information; the target node is detected whether it meets the deletion condition; if the target node meets the deletion condition, the target node is deleted in the software-defined storage domain.

[0172] In some optional implementations, the deletion module 403 is specifically used to obtain target data corresponding to the target node; search for the target data in other nodes in the software-defined storage domain except the target node; if the target data is found in other nodes, obtain the first resource occupancy corresponding to the target data; obtain the total resource occupancy corresponding to the software-defined storage domain; the total resource occupancy includes the resource occupancy corresponding to each node in the software-defined storage domain; subtract the first resource occupancy from the total resource occupancy to obtain the current actual resource occupancy; obtain the total available storage resources corresponding to the software-defined storage domain and the first available storage resources corresponding to the target node; subtract the first available storage resources from the total available storage resources to obtain the remaining available storage resources; compare the current actual resource occupancy with the remaining available storage resources; if the current actual resource occupancy is less than the remaining available storage resources, determine that the target node meets the deletion condition; if the current actual resource occupancy is equal to or greater than the remaining available storage resources, determine that the target node does not meet the deletion condition.

[0173] In some optional implementations, the deletion module 403 is specifically used to release the association between the target resource on the target node and other preset resources in the software-defined storage domain; and delete the target resource corresponding to the target node in the software-defined storage domain.

[0174] In some optional implementations, the deletion module 403 is also used to periodically detect the current number of nodes corresponding to the software-defined storage domain; compare the current number of nodes with the historical number of nodes in the virtual machine management list; if the current number of nodes is inconsistent with the historical number of nodes, update the historical number of nodes in the virtual machine management list according to the current number of nodes.

[0175] In some optional implementations, the deletion module 403 is also used to periodically detect the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine; compare the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list; if the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list, update the information in the virtual machine management list according to the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine.

[0176] In some optional implementations, the reasons for the abnormality of the target node include the abnormality of the target node, the deletion module 403, which is specifically used to control the stopping of the monitoring service task running on the target node; the monitoring service task is used to monitor the target node and / or the target virtual machine corresponding to the target node; find the association information between the target node and the target virtual machine; delete the association information between the target node and the target virtual machine, and delete the target resource corresponding to the target node in the software-defined storage domain.

[0177] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0178] The node deletion device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0179] The embodiment of the present invention also provides a computer device having the above Figure 4 The node shown is deleted.

[0180] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0181] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0182] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0183] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0184] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0185] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0186] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0187] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0188] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A node deletion method, characterized in that: The method comprises: Check whether each node in the software-defined storage domain is normal; If there is an abnormal target node, detecting the cause of the abnormality of the target node; According to the reason why the abnormality occurs in the target node, the target node is deleted in the software defined storage domain.

2. The method according to claim 1, characterized in that The reason why the target node is abnormal includes deletion of a target virtual machine corresponding to the target node, and deleting the target node in the software defined storage domain according to the reason why the target node is abnormal includes: Obtain a virtual machine management list from a preset storage location; the virtual machine management list includes the corresponding relationship between each node and each virtual machine in the software-defined storage domain and the management network information corresponding to each virtual machine; the virtual machine management list is generated after the software-defined storage domain is deployed; Determine the target management network information corresponding to the target virtual machine according to the management network information corresponding to each of the virtual machines, and determine the target node to be deleted according to the target management network information; Detecting whether the target node meets the deletion condition; If the target node meets the deletion condition, the target node is deleted in the software defined storage domain.

3. The method according to claim 2, characterized in that The detecting whether the target node satisfies the deletion condition includes: Obtaining target data corresponding to the target node; Searching for the target data in other nodes of the software defined storage domain except the target node; If the target data is found in the other node, obtaining the first resource occupancy corresponding to the target data; Obtaining a total resource occupancy corresponding to the software-defined storage domain; the total resource occupancy includes a resource occupancy corresponding to each of the nodes in the software-defined storage domain; Subtracting the first resource occupancy from the total resource occupancy to obtain a current actual resource occupancy; Obtaining total available storage resources corresponding to the software defined storage domain and a first available storage resource corresponding to the target node; Subtracting the first available storage resource from the total available storage resource to obtain remaining available storage resources; Comparing the current actual resource occupancy with the remaining available storage resources; If the current actual resource occupancy is less than the remaining available storage resources, determining that the target node meets the deletion condition; If the current actual resource occupancy is equal to or greater than the remaining available storage resources, it is determined that the target node does not meet the deletion condition.

4. The method according to claim 2, characterized in that: If the target node satisfies the deletion condition, deleting the target node in the software defined storage domain includes: Disconnecting the target resource on the target node from other preset resources in the software defined storage domain; The target resource corresponding to the target node is deleted in the software defined storage domain.

5. The method according to claim 2, characterized in that: The method further comprises: Periodically detecting the current number of nodes corresponding to the software defined storage domain; Compare the current number of nodes with the number of historical nodes in the virtual machine management list; If the current node number is inconsistent with the historical node number, the historical node number in the virtual machine management list is updated according to the current node number.

6. The method according to claim 2, characterized in that The method further comprises: Periodically detecting the corresponding relationship between each of the nodes and each of the virtual machines in the software-defined storage domain and the management network information corresponding to each of the virtual machines; Compare the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine with the information in the virtual machine management list; If the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine are inconsistent with the information in the virtual machine management list; Then, according to the detected corresponding relationship between each node and each virtual machine and the management network information corresponding to each virtual machine, the information in the virtual machine management list is updated.

7. The method according to claim 1, characterized in that The reason why the target node is abnormal includes that the target node is abnormal, and deleting the target node in the software defined storage domain according to the reason why the target node is abnormal includes: Controlling the monitoring service task running on the target node to stop; the monitoring service task is used to monitor the target node and / or the target virtual machine corresponding to the target node; Finding association information between the target node and the target virtual machine; The association information between the target node and the target virtual machine is deleted, and the target resource corresponding to the target node is deleted in the software defined storage domain.

8. A node deletion device, characterized in that: The device comprises: The first detection module is used to detect whether each node in the software-defined storage domain is normal; A second detection module is used to detect the cause of the abnormality of the target node if there is an abnormal target node; A deletion module is used to delete the target node in the software-defined storage domain according to the reason why the abnormality occurs in the target node.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the node deletion method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the node deletion method according to any one of claims 1 to 7.