Storage volume processing method and device, electronic equipment and storage medium

By listening to custom resource object update events on cloud cluster nodes, recording and executing uninstalled storage volume operations again, the problem of uninstalling storage volumes in cloud clusters is solved, and the timely release of storage space and cost reduction is achieved.

CN119759264AActive Publication Date: 2025-04-04CHINA TELECOM CLOUD TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411782576.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-04
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

In a cloud cluster, storage volumes cannot be uninstalled successfully, resulting in the storage space being unable to be released in time, increasing enterprise costs.

Method used

By listening to the custom resource object update event on the cloud cluster node, obtain uninstall information and record the storage volume ID that was not successfully uninstalled, and then perform the uninstall operation again to ensure that the storage volume is successfully uninstalled.

Benefits of technology

It increases the probability that the storage volume is successfully uninstalled and deleted, frees up storage space in a timely manner, avoids the consumption of storage resources, and reduces enterprise costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759264A_ABST
    Figure CN119759264A_ABST
Patent Text Reader

Abstract

The invention provides a storage volume processing method and device, electronic equipment and a storage medium. Under the condition that an unloading event of unloading the target storage volume on the node is monitored, if the target storage volume is still mounted on the node, unloading information is recorded in the user-defined resource object, and the unloading information at least carries the target ID of the target storage volume. And subsequently, under the condition that an updating event of the user-defined resource object is monitored, acquiring updated unloading information in the user-defined resource object, and executing the unloading operation of unloading the target storage volume on the node again according to the target ID in the unloading information. Through the method and the device, the target storage volume corresponding to the target ID which is not successfully unloaded on the node can be compensated and unloaded, so that the probability / possibility that the target storage volume corresponding to the target ID which is not successfully unloaded on the node in the cloud cluster can be unloaded from the node is increased, the probability that the target storage volume can be timely released is further improved, and the unloaded target storage volume can be timely released. And the storage resources are prevented from being used up.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a storage volume processing method, device, electronic device and storage medium. Background Art

[0002] In the scenario where a cloud cluster provides storage volumes as cloud disks based on the container storage interface, the containers on the nodes in the cloud cluster will mount external storage volumes for use by the containers.

[0003] Sometimes, you may no longer need to mount external storage volumes on the container based on actual needs. In this case, you can reclaim the external storage volumes. For example, you may need to delete the storage volumes from the node to free up the storage space of the storage volumes. Summary of the invention

[0004] The present application shows a storage volume processing method, device, electronic device and storage medium.

[0005] In a first aspect, the present application shows a node applied in a cloud cluster, the method comprising:

[0006] Listen for update events of custom resource objects of nodes in the cloud cluster;

[0007] In the case of monitoring an update event of a custom resource object of a node in the cloud cluster, obtaining uninstallation information updated in the custom resource object of the node in the cloud cluster, the uninstallation information at least carrying a target identity identifier ID of the target storage volume, the uninstallation information being used to indicate that the target storage volume corresponding to the target ID is not successfully uninstalled on the node in the cloud cluster; the uninstallation information is: recorded in the custom resource object of the node in the cloud cluster in the case that the target storage volume is still mounted on the node in the cloud cluster after monitoring an uninstallation event of uninstalling the target storage volume on the node in the cloud cluster;

[0008] According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the node in the cloud cluster is performed again.

[0009] In a second aspect, the present application shows a storage volume processing method, which is applied to a node in a cloud cluster, and the method includes:

[0010] Listen for unmounting events of storage volumes being unmounted on nodes in the cloud cluster;

[0011] In case of monitoring an unmounting event of unmounting a target storage volume on a node in the cloud cluster, detecting whether the target storage volume is still mounted on the node;

[0012] When the target storage volume is still mounted on the node, the uninstallation information is recorded in the custom resource object of the node in the cloud cluster, and the uninstallation information carries at least the target identity identifier ID of the target storage volume. The uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

[0013] In a third aspect, the present application shows a storage volume processing device, which is applied to a node in a cloud cluster, and the device includes:

[0014] A first monitoring module, used to monitor update events of custom resource objects of nodes in the cloud cluster;

[0015] An acquisition module is used to acquire the uninstallation information updated in the custom resource object of the node in the cloud cluster when an update event of the custom resource object of the node in the cloud cluster is monitored, wherein the uninstallation information carries at least a target identity identifier ID of the target storage volume, and the uninstallation information is used to indicate that the target storage volume corresponding to the target ID is not successfully uninstalled on the node in the cloud cluster; the uninstallation information is: recorded in the custom resource object of the node in the cloud cluster when the target storage volume is still mounted on the node in the cloud cluster after the uninstallation event of uninstalling the target storage volume on the node in the cloud cluster is monitored;

[0016] The unloading module is used to re-execute the unloading operation of unloading the target storage volume on the node in the cloud cluster according to the target ID in the unloading information.

[0017] In a fourth aspect, the present application shows a storage volume processing device, which is applied to a node in a cloud cluster, and the device includes:

[0018] A third monitoring module is used to monitor an unmounting event of unmounting a storage volume on a node in the cloud cluster;

[0019] A detection module, configured to detect whether the target storage volume is still mounted on a node in the cloud cluster when an unmounting event of unmounting the target storage volume on the node is monitored;

[0020] A recording module is used to record uninstallation information in a custom resource object of a node in a cloud cluster when the target storage volume is still mounted on the node, wherein the uninstallation information carries at least a target identity identifier ID of the target storage volume, and the uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

[0021] In a fifth aspect, the present application illustrates an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.

[0022] In a sixth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.

[0023] In a seventh aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.

[0024] The technical solution provided by this application may have the following beneficial effects:

[0025] In the present application, an unmount event of unmounting a storage volume on a node in a cloud cluster is monitored; in the case of an unmount event of unmounting a target storage volume on a node in the cloud cluster being monitored, it is detected whether the target storage volume is still mounted on the node; in the case of the target storage volume still being mounted on the node, the unmount information is recorded in a custom resource object of the node in the cloud cluster, the unmount information carries at least a target identity identifier ID of the target storage volume, and the unmount information is used to indicate that the target storage volume corresponding to the target ID has not been successfully unmounted on the node in the cloud cluster.

[0026] This makes it possible to monitor update events of custom resource objects of nodes in the cloud cluster; when update events of custom resource objects of nodes in the cloud cluster are monitored, the updated uninstallation information in the custom resource objects of the nodes in the cloud cluster is obtained, and the uninstallation information carries at least the target identity identifier ID of the target storage volume. According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the nodes in the cloud cluster is performed again.

[0027] Through the present application, it is possible to achieve compensatory unloading of the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster, thereby increasing the probability / possibility that the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster can be unloaded from the node, thereby increasing the probability that the target storage volume can be deleted from the node, thereby increasing the probability that the target storage volume can be released in a timely manner, avoiding the exhaustion of storage resources, and effectively reducing enterprise costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flowchart of the steps of a storage volume processing method of the present application.

[0029] Figure 2 It is a flowchart of the steps of a storage volume processing method of the present application.

[0030] Figure 3 It is a schematic diagram of components in a node of the present application.

[0031] Figure 4 It is a schematic diagram of a storage volume processing method of the present application.

[0032] Figure 5 It is a structural block diagram of a storage volume processing device of the present application.

[0033] Figure 6 It is a structural block diagram of a storage volume processing device of the present application.

[0034] Figure 7 It is a block diagram of an electronic device of the present application.

[0035] Figure 8 It is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0037] When a storage volume needs to be deleted from a node to release storage space of the storage volume, the storage volume needs to be unmounted from the container first, and then the storage volume is unmounted from the node, so that the storage volume can be deleted from the node to release storage space of the storage volume.

[0038] During the process of unmounting the storage volume from the container, if an exception occurs and the storage volume cannot be unmounted from the container, the node will forcibly unmount the storage volume at the logical level (that is, unbind the binding relationship between the storage volume and the container at the logical level). At this time, the technician can manually unmount the container on the node, and then control the agent service in the node (such as Kubelet) to retry unmounting the storage volume from the node.

[0039] However, if Kubelet is restarted due to special reasons (such as exceptions or other reasons) during this process, Kubelet will rescan the container directory on the node after startup to obtain the storage volume mounted on the container. Because the binding relationship between the above-mentioned storage volume and the container has been unbound at the logical level and the container has been uninstalled on the node, the restarted Kubelet will usually believe that the above-mentioned storage volume has been uninstalled (for example, uninstalled from the container and uninstalled from the node), and will execute the operation of deleting the storage volume from the node.

[0040] However, because the storage volume is actually still mounted on the node, the operation of deleting the storage volume from the node will fail. The only way to deal with it is waiting for technical personnel to intervene, which is time-consuming and inefficient. In the long run, storage resources will be exhausted because they cannot be released, increasing enterprise costs.

[0041] Before introducing the solution of the present application, the technical terms that may be involved in the present application are first explained.

[0042] K8S (Kubernetes): An open source platform for managing containerized workloads and services that can be configured declaratively.

[0043] CRD (Custom Resource Definitions): It is an extension of the K8S API (Application Programming Interface), based on which you can define resource objects yourself.

[0044] CR (Custom Resource): is an instance of a custom resource definition and represents a custom resource entity.

[0045] CC (Custom Controllers): monitors CR and executes specific programs according to the changes of CR.

[0046] CSI (Container Storage Interface): Used to establish a standard storage management interface between K8S and external storage systems, and provide storage services for containers through the interface.

[0047] PV (Persistent Volume): A persistent storage volume provided by K8S, mounted into a container for persistent storage of data in the container.

[0048] Kubelet: An "agent" service running on each node that manages and maintains K8S resources on the node.

[0049] Container: The smallest workload in K8S, a collection of one or more containers.

[0050] DaemonSet: A K8S workload that ensures that only one Pod copy runs on each node.

[0051] Deployment: A K8S workload that maintains Pod copies.

[0052] Prometheus: An open source monitoring and alerting tool.

[0053] This application is mainly used in edge computing cloud disk scenarios. Through the API extension features provided by K8S, it monitors and uninstalls failed storage volumes and performs compensatory uninstallation, and issues prompts / alarms when manual intervention is required to avoid storage volumes not being released in time and causing storage resources to be exhausted, which can effectively reduce enterprise costs.

[0054] Reference Figure 1 , shows a flowchart of the steps of a storage volume processing method of the present application, wherein the method includes:

[0055] In step S101 , an unmounting event of unmounting a storage volume on a node in a cloud cluster is monitored.

[0056] In the present application, a custom controller on a node may monitor an unmounting event of unmounting a storage volume on a node in a cloud cluster.

[0057] Alternatively, you can monitor the event resource object in K8S through the Watch interface provided by K8S. If the event resource object indicates that there is an unmount event of unmounting the storage volume on the node in the cloud cluster, it can be considered that the unmount event of unmounting the storage volume on the node in the cloud cluster is monitored.

[0058] When an unmounting event of unmounting the target storage volume on a node in the cloud cluster is monitored, in step S102 , it is detected whether the target storage volume is still mounted on the node.

[0059] Among them, mounting or unmounting storage volumes on a node requires the use of a storage volume client in the node. The storage volume client performs the mounting and unmounting operations on the storage volume. The storage volume client maintains a list of storage volume IDs (Identity Documents) for storing the IDs of the storage volumes currently mounted on the node.

[0060] In this way, in this step, it can be detected whether the target ID of the target storage volume exists in the list. If the target ID of the target storage volume exists in the list, it can be determined that the target storage volume is still mounted on the node; or, if the target ID of the target storage volume does not exist in the list, it can be determined that the target storage volume is not mounted on the node.

[0061] When the target storage volume is still mounted on the node, in step S103, the uninstallation information is recorded in the custom resource object of the node in the cloud cluster. The uninstallation information carries at least the target ID of the target storage volume. The uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

[0062] In the present application, each node has a custom resource object, so the execution subject of the embodiment of the present application can be a node in a cloud cluster, and the node can be a physical server, etc.

[0063] In the present application, steps S101 to S103 can be executed by the monitoring component in the node. The monitoring component can be deployed on the node in advance in the DaemonSet manner. The monitoring component on a node is only responsible for monitoring the storage volume on the node where it is located and maintaining the custom resource objects on the node. The monitoring component on a node executes steps S101 to S103 on the node, but not on other nodes, to avoid resource competition.

[0064] Recording the uninstallation information in the custom resource object of the node in the cloud cluster can save the state of the target storage volume.

[0065] In the present application, an unmount event of unmounting a storage volume on a node in a cloud cluster is monitored; when an unmount event of unmounting a target storage volume on a node in the cloud cluster is monitored, it is detected whether the target storage volume is still mounted on the node; when the target storage volume is still mounted on the node, the unmount information is recorded in a custom resource object of the node in the cloud cluster, and the unmount information carries at least a target ID of the target storage volume, and the unmount information is used to indicate that the target storage volume corresponding to the target ID has not been successfully unmounted on the node in the cloud cluster.

[0066] This makes it possible to monitor update events of custom resource objects of nodes in the cloud cluster; when update events of custom resource objects of nodes in the cloud cluster are monitored, the updated uninstallation information in the custom resource objects of the nodes in the cloud cluster is obtained, and the uninstallation information carries at least the target ID of the target storage volume. According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the nodes in the cloud cluster is performed again.

[0067] Through the present application, it is possible to achieve compensatory unloading of the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster, thereby increasing the probability / possibility that the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster can be unloaded from the node, thereby increasing the probability that the target storage volume can be deleted from the node, thereby increasing the probability that the target storage volume can be released in a timely manner, avoiding the exhaustion of storage resources, and effectively reducing enterprise costs.

[0068] Reference Figure 2 , shows a flowchart of the steps of a storage volume processing method of the present application, wherein the method includes:

[0069] In step S201 , update events of custom resource objects of nodes in a cloud cluster are monitored.

[0070] In the present application, the update events of the custom resource objects of the nodes in the cloud cluster can be monitored by the custom controller on the node.

[0071] Alternatively, you can monitor the event resource object in K8S through the Watch interface provided by K8S. If the event resource object indicates that there is an update event for the custom resource object of the node in the cloud cluster, it can be considered that the update event for the custom resource object of the node in the cloud cluster is monitored.

[0072] When an update event of a custom resource object of a node in the cloud cluster is monitored, in step S202, the uninstallation information updated in the custom resource object of the node in the cloud cluster is obtained, and the uninstallation information carries at least the target ID of the target storage volume. The uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

[0073] The uninstall information is Figure 1 For example, the uninstallation information is recorded in a custom resource object of a node in the cloud cluster when the target storage volume is still mounted on the node in the cloud cluster after an uninstallation event of uninstalling the target storage volume on the node in the cloud cluster is monitored.

[0074] The target storage volume corresponding to the target ID carried in the uninstallation information is still mounted on the node. However, the target storage volume corresponding to the target ID is the storage volume that needs to be uninstalled from the node. Therefore, the uninstallation operation of uninstalling the target storage volume on the node in the cloud cluster can be performed again according to the target ID in the uninstallation information.

[0075] In step S203, according to the target ID in the unmounting information, the unmounting operation of unmounting the target storage volume on the node in the cloud cluster is performed again.

[0076] For example, the target ID in the uninstallation information is added to the uninstallation task queue. Next, for the ID in the task queue, an uninstallation operation of the storage volume corresponding to the ID in the task queue is performed on the node in the cloud cluster.

[0077] Before adding the target ID in the uninstall information to the uninstall task queue, first check whether the target ID exists in the uninstall task queue. If the target ID does not exist in the uninstall task queue, then add the target ID in the uninstall information to the uninstall task queue to avoid adding the same ID repeatedly to the uninstall task queue.

[0078] A function for unmounting a storage volume in the CSI of a node (eg, a NodeUnStage Volume function, etc.) may be called for the target ID to implement an unmount operation of unmounting the target storage volume on a node in the cloud cluster.

[0079] According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the node in the cloud cluster is performed again, which is equivalent to a compensatory uninstallation of the target storage volume.

[0080] In the present application, each node has a custom resource object, so the execution subject of the embodiment of the present application can be a node in a cloud cluster, and the node can be a physical server, etc.

[0081] In the present application, steps S201 to S203 can be executed by the self-healing component in the node. The self-healing component can be deployed on the node in advance through the CSI nodeplugin pod. The self-healing component on a node is only responsible for unloading the storage volume on the node where it is located and maintaining the custom resource objects on the node. The self-healing component on a node executes steps S201 to S203 on the node, but not on other nodes, to avoid resource competition.

[0082] In the present application, an unmount event of unmounting a storage volume on a node in a cloud cluster is monitored; when an unmount event of unmounting a target storage volume on a node in the cloud cluster is monitored, it is detected whether the target storage volume is still mounted on the node; when the target storage volume is still mounted on the node, the unmount information is recorded in a custom resource object of the node in the cloud cluster, and the unmount information carries at least a target ID of the target storage volume, and the unmount information is used to indicate that the target storage volume corresponding to the target ID has not been successfully unmounted on the node in the cloud cluster.

[0083] This makes it possible to monitor update events of custom resource objects of nodes in the cloud cluster; when update events of custom resource objects of nodes in the cloud cluster are monitored, the updated uninstallation information in the custom resource objects of the nodes in the cloud cluster is obtained, and the uninstallation information carries at least the target ID of the target storage volume. According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the nodes in the cloud cluster is performed again.

[0084] Through the present application, it is possible to achieve compensatory unloading of the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster, thereby increasing the probability / possibility that the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster can be unloaded from the node, thereby increasing the probability that the target storage volume can be deleted from the node, thereby increasing the probability that the target storage volume can be released in a timely manner, avoiding the exhaustion of storage resources, and effectively reducing enterprise costs.

[0085] In another embodiment of the present application, after the unloading operation of unloading the target storage volume on the node in the cloud cluster is executed again, if the target storage volume corresponding to the target ID is successfully unloaded on the node in the cloud cluster, the unloading information will no longer take effect subsequently. In this way, in order to save the storage space of the node, and in order to avoid the subsequent "unloading operation of unloading the target storage volume on the node in the cloud cluster according to the target ID in the unloading information (since the target storage volume has been unloaded from the node, the unloading operation is an invalid operation)" to save the system resources of the node, the unloading information can be deleted in the custom resource object of the node in the cloud cluster.

[0086] In another embodiment of the present application, after the unloading operation of unloading the target storage volume on the node in the cloud cluster is performed again, if the target storage volume corresponding to the target ID is still not successfully unloaded on the node in the cloud cluster, then according to the target ID, in the custom resource object of the node in the cloud cluster, the corresponding relationship between the target ID of the target storage volume and the number of unsuccessful unloading of the target storage volume is searched, and the number of unsuccessful unloading in the corresponding relationship is increased by a preset value. To achieve the update of the number of unsuccessful unloading of the target storage volume. The preset value may include 1 or 2, etc., which may be determined according to the actual situation, and the present application does not limit this.

[0087] Alternatively, if the correspondence between the target ID of the target storage volume and the number of unsuccessful unmountings of the target storage volume is not found, a correspondence is established in the custom resource object of the node in the cloud cluster, which has the target ID and an initial value of the number of times. The initial value of the number of times can be 1, which is used to record that the number of unsuccessful unmountings of the target storage volume corresponding to the target ID that has not been successfully unmounted on the node in the cloud cluster is 1.

[0088] In another embodiment of the present application, after the unloading operation of unloading the target storage volume on the node in the cloud cluster is executed again, if the target storage volume corresponding to the target ID is successfully unloaded on the node in the cloud cluster, the corresponding relationship will no longer take effect subsequently. In this way, in order to save the storage space of the node, the correspondence between the target ID of the target storage volume and the number of unsuccessful unloading of the target storage volume can be searched in the custom resource object of the node in the cloud cluster according to the target ID, and then the corresponding relationship is deleted in the custom resource object of the node in the cloud cluster.

[0089] In another embodiment of the present application, after the preset value is increased for the number of unsuccessful uninstallations in the corresponding relationship, it is monitored whether the updated number of unsuccessful uninstallations in the corresponding relationship exceeds a preset threshold.

[0090] The preset threshold can be set by the technician according to the actual situation. This application does not limit the specific value of the preset threshold. For example, it can be 2, 3, 4, 5 or 6.

[0091] In the present application, a custom controller on the node can "listen to whether the updated number of unsuccessful uninstallations in the corresponding relationship exceeds a preset threshold after increasing the number of unsuccessful uninstallations in the corresponding relationship by a preset value."

[0092] Alternatively, you can monitor the event resource object in K8S through the Watch interface provided by K8S. If the event resource object indicates that there is an increase event that increases the number of unsuccessful uninstallations in the corresponding relationship by a preset value, it can be considered that the number of unsuccessful uninstallations in the corresponding relationship is increased by a preset value, and then you can monitor whether the updated number of unsuccessful uninstallations in the corresponding relationship exceeds the preset threshold.

[0093] In the case where the updated number of unsuccessful uninstallations in the corresponding relationship exceeds a preset threshold, a prompt message is output, the prompt message carries at least the target ID, and the prompt message is used to prompt that the number of unsuccessful uninstallations of the target storage volume corresponding to the target ID on the node in the cloud cluster exceeds the preset threshold. This allows the technician to perceive that the number of unsuccessful uninstallations of the target storage volume corresponding to the target ID on the node in the cloud cluster exceeds the preset threshold, and then perceive that the target storage volume corresponding to the target ID has been unsuccessfully uninstalled from the node for multiple times, and then manually intervene in time to eliminate the fault as soon as possible, for example, uninstall the target storage volume on the node as soon as possible to release the storage space of the target storage volume.

[0094] In another embodiment of the present application, "after increasing the preset value of the number of unsuccessful uninstallations in the corresponding relationship, monitoring whether the updated number of unsuccessful uninstallations in the corresponding relationship exceeds the preset threshold" and "when the updated number of unsuccessful uninstallations in the corresponding relationship exceeds the preset threshold, outputting a prompt message" can be implemented by the alarm component in the node.

[0095] In one embodiment, the target ID and the number of unsuccessful unmounting of the target storage volume may be assembled into Prometheus indicator data, and the Prometheus indicator data may be stored, or the Prometheus indicator data may be uploaded to Prometheus through an indicator interface, and then called and viewed by a technician.

[0096] An alarm component is deployed on a node. The alarm component can be deployed on the node in advance through Deployment. The alarm component on a node is only responsible for alerting the unloading of the storage volume on the node. The alarm component on a node executes "after increasing the preset value of the number of unsuccessful unloadings in the corresponding relationship, monitor whether the updated number of unsuccessful unloadings in the corresponding relationship exceeds the preset threshold" and "when the updated number of unsuccessful unloadings in the corresponding relationship exceeds the preset threshold, output prompt information" for the node, but does not execute "after increasing the preset value of the number of unsuccessful unloadings in the corresponding relationship, monitor whether the updated number of unsuccessful unloadings in the corresponding relationship exceeds the preset threshold" and "when the updated number of unsuccessful unloadings in the corresponding relationship exceeds the preset threshold, output prompt information" for other nodes to avoid resource competition.

[0097] in addition, Figure 3 A schematic diagram showing components in a node. Figure 4 A schematic diagram of a storage volume processing method is shown.

[0098] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.

[0099] Reference Figure 5 , shows a storage volume processing device of the present application, which is applied to a node in a cloud cluster, and the device includes:

[0100] The first monitoring module 11 is used to monitor update events of custom resource objects of nodes in the cloud cluster;

[0101] The acquisition module 12 is used to acquire the uninstallation information updated in the custom resource object of the node in the cloud cluster when an update event of the custom resource object of the node in the cloud cluster is monitored, wherein the uninstallation information carries at least the target ID of the target storage volume, and the uninstallation information is used to indicate that the target storage volume corresponding to the target ID is not successfully uninstalled on the node in the cloud cluster; the uninstallation information is: recorded in the custom resource object of the node in the cloud cluster when the target storage volume is still mounted on the node in the cloud cluster after the uninstallation event of uninstalling the target storage volume on the node in the cloud cluster is monitored;

[0102] The unloading module 13 is used to perform the unloading operation of unloading the target storage volume on the node in the cloud cluster again according to the target ID in the unloading information.

[0103] In an optional implementation, the device further includes:

[0104] The first deletion module is used to delete the uninstallation information in the custom resource object of the node in the cloud cluster if the target storage volume corresponding to the target ID is successfully uninstalled on the node in the cloud cluster after the uninstallation operation of uninstalling the target storage volume on the node in the cloud cluster is executed again.

[0105] In an optional implementation, the device further includes:

[0106] A first search module is used for searching, in a custom resource object of a node in the cloud cluster, for a corresponding relationship between a target ID of the target storage volume and the number of unsuccessful unmountings of the target storage volume according to the target ID, if the target storage volume corresponding to the target ID is still not successfully unmounted on the node in the cloud cluster after the unmounting operation of unmounting the target storage volume on the node in the cloud cluster is performed again;

[0107] The adding module is used to increase the preset value of the number of unsuccessful uninstallations in the corresponding relationship.

[0108] In an optional implementation, the device further includes:

[0109] A second search module is used for searching, in a custom resource object of the node in the cloud cluster, for a corresponding relationship between a target ID of the target storage volume and the number of unsuccessful unmountings of the target storage volume according to the target ID, if the target storage volume corresponding to the target ID is successfully unmounted on the node in the cloud cluster after the unmounting operation of unmounting the target storage volume on the node in the cloud cluster is performed again;

[0110] The second deletion module is used to delete the corresponding relationship in the custom resource object of the node in the cloud cluster.

[0111] In an optional implementation, the device further includes:

[0112] A second monitoring module is used to monitor whether the updated number of unsuccessful uninstallations in the corresponding relationship exceeds a preset threshold after the number of unsuccessful uninstallations in the corresponding relationship is increased by a preset value;

[0113] The output module is used to output a prompt message when the number of unsuccessful uninstallations after update in the corresponding relationship exceeds a preset threshold value. The prompt message carries at least a target ID, and the prompt message is used to prompt that the number of unsuccessful uninstallations of the target storage volume corresponding to the target ID that has not been successfully uninstalled on the node in the cloud cluster exceeds the preset threshold value.

[0114] In the present application, an unmount event of unmounting a storage volume on a node in a cloud cluster is monitored; when an unmount event of unmounting a target storage volume on a node in the cloud cluster is monitored, it is detected whether the target storage volume is still mounted on the node; when the target storage volume is still mounted on the node, the unmount information is recorded in a custom resource object of the node in the cloud cluster, and the unmount information carries at least a target ID of the target storage volume, and the unmount information is used to indicate that the target storage volume corresponding to the target ID has not been successfully unmounted on the node in the cloud cluster.

[0115] This makes it possible to monitor update events of custom resource objects of nodes in the cloud cluster; when update events of custom resource objects of nodes in the cloud cluster are monitored, the updated uninstallation information in the custom resource objects of the nodes in the cloud cluster is obtained, and the uninstallation information carries at least the target ID of the target storage volume. According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the nodes in the cloud cluster is performed again.

[0116] Through the present application, it is possible to achieve compensatory unloading of the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster, thereby increasing the probability / possibility that the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster can be unloaded from the node, thereby increasing the probability that the target storage volume can be deleted from the node, thereby increasing the probability that the target storage volume can be released in a timely manner, avoiding the exhaustion of storage resources, and effectively reducing enterprise costs.

[0117] Reference Figure 6 , shows a storage volume processing device of the present application, which is applied to a node in a cloud cluster, and the device includes:

[0118] The third monitoring module 21 is used to monitor the unmounting event of unmounting the storage volume on the node in the cloud cluster;

[0119] A detection module 22, configured to detect whether the target storage volume is still mounted on a node in the cloud cluster when an unmounting event of unmounting the target storage volume on the node is monitored;

[0120] The recording module 23 is used to record the uninstallation information in the custom resource object of the node in the cloud cluster when the target storage volume is still mounted on the node, and the uninstallation information carries at least the target ID of the target storage volume. The uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

[0121] In the present application, an unmount event of unmounting a storage volume on a node in a cloud cluster is monitored; when an unmount event of unmounting a target storage volume on a node in the cloud cluster is monitored, it is detected whether the target storage volume is still mounted on the node; when the target storage volume is still mounted on the node, the unmount information is recorded in a custom resource object of the node in the cloud cluster, and the unmount information carries at least a target ID of the target storage volume, and the unmount information is used to indicate that the target storage volume corresponding to the target ID has not been successfully unmounted on the node in the cloud cluster.

[0122] This makes it possible to monitor update events of custom resource objects of nodes in the cloud cluster; when update events of custom resource objects of nodes in the cloud cluster are monitored, the updated uninstallation information in the custom resource objects of the nodes in the cloud cluster is obtained, and the uninstallation information carries at least the target ID of the target storage volume. According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the nodes in the cloud cluster is performed again.

[0123] Through the present application, it is possible to achieve compensatory unloading of the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster, thereby increasing the probability / possibility that the target storage volume corresponding to the target ID that has not been successfully unloaded on the node in the cloud cluster can be unloaded from the node, thereby increasing the probability that the target storage volume can be deleted from the node, thereby increasing the probability that the target storage volume can be released in a timely manner, avoiding the exhaustion of storage resources, and effectively reducing enterprise costs.

[0124] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0125] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0126] Figure 7 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0127] Reference Figure 7 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0128] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0129] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0130] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0131] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also monitor the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0132] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0133] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0134] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can monitor the open / closed state of the device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also monitor the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to monitor the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0135] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0136] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0137] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0138] Figure 81 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.

[0139] Reference Figure 8 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0140] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0141] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0143] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0144] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A storage volume processing method, characterized in that: Applied to a node in a cloud cluster, the method comprises: Listen for update events of custom resource objects of nodes in the cloud cluster; In the case of monitoring an update event of a custom resource object of a node in the cloud cluster, obtaining uninstallation information updated in the custom resource object of the node in the cloud cluster, the uninstallation information at least carrying a target identity identifier ID of the target storage volume, the uninstallation information being used to indicate that the target storage volume corresponding to the target ID is not successfully uninstalled on the node in the cloud cluster; the uninstallation information is: recorded in the custom resource object of the node in the cloud cluster in the case that the target storage volume is still mounted on the node in the cloud cluster after monitoring an uninstallation event of uninstalling the target storage volume on the node in the cloud cluster; According to the target ID in the uninstallation information, the uninstallation operation of uninstalling the target storage volume on the node in the cloud cluster is performed again.

2. The method according to claim 1, characterized in that The method further comprises: After the unmounting operation of unmounting the target storage volume on the node in the cloud cluster is performed again, if the target storage volume corresponding to the target ID is successfully unmounted on the node in the cloud cluster, the unmounting information is deleted in the custom resource object of the node in the cloud cluster.

3. The method according to claim 1, characterized in that The method further comprises: After the unmounting operation of unmounting the target storage volume on the node in the cloud cluster is performed again, if the target storage volume corresponding to the target ID is still not successfully unmounted on the node in the cloud cluster, then according to the target ID, in the custom resource object of the node in the cloud cluster, the corresponding relationship between the target ID of the target storage volume and the number of unsuccessful unmounting of the target storage volume is searched; The number of unsuccessful uninstallations in the corresponding relationship is increased by a preset value.

4. The method according to claim 3, characterized in that The method further comprises: After the unmounting operation of unmounting the target storage volume on the node in the cloud cluster is performed again, if the target storage volume corresponding to the target ID is successfully unmounted on the node in the cloud cluster, then according to the target ID, in the custom resource object of the node in the cloud cluster, the corresponding relationship between the target ID of the target storage volume and the number of unsuccessful unmounting of the target storage volume is searched; In the custom resource object of the node in the cloud cluster, the corresponding relationship is deleted.

5. The method according to claim 4, characterized in that The method further comprises: After increasing the preset value of the number of unsuccessful uninstallations in the corresponding relationship, monitoring whether the updated number of unsuccessful uninstallations in the corresponding relationship exceeds a preset threshold; When the number of unsuccessful uninstallations after update in the corresponding relationship exceeds a preset threshold, a prompt message is output, the prompt message carries at least a target ID, and the prompt message is used to prompt that the number of unsuccessful uninstallations of the target storage volume corresponding to the target ID that has not been successfully uninstalled on the node in the cloud cluster exceeds the preset threshold.

6. A storage volume processing method, characterized in that: Applied to a node in a cloud cluster, the method comprises: Listen for unmounting events of storage volumes being unmounted on nodes in the cloud cluster; In case of monitoring an unmounting event of unmounting a target storage volume on a node in the cloud cluster, detecting whether the target storage volume is still mounted on the node; When the target storage volume is still mounted on the node, the uninstallation information is recorded in the custom resource object of the node in the cloud cluster, and the uninstallation information carries at least the target identity identifier ID of the target storage volume. The uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

7. A storage volume processing device, characterized in that: Applied to a node in a cloud cluster, the device comprises: A first monitoring module, used to monitor update events of custom resource objects of nodes in the cloud cluster; An acquisition module is used to acquire the uninstallation information updated in the custom resource object of the node in the cloud cluster when an update event of the custom resource object of the node in the cloud cluster is monitored, wherein the uninstallation information carries at least a target identity identifier ID of the target storage volume, and the uninstallation information is used to indicate that the target storage volume corresponding to the target ID is not successfully uninstalled on the node in the cloud cluster; the uninstallation information is: recorded in the custom resource object of the node in the cloud cluster when the target storage volume is still mounted on the node in the cloud cluster after the uninstallation event of uninstalling the target storage volume on the node in the cloud cluster is monitored; The unloading module is used to re-execute the unloading operation of unloading the target storage volume on the node in the cloud cluster according to the target ID in the unloading information.

8. A storage volume processing device, characterized in that: Applied to a node in a cloud cluster, the device comprises: A third monitoring module is used to monitor an unmounting event of unmounting a storage volume on a node in the cloud cluster; A detection module, configured to detect whether the target storage volume is still mounted on a node in the cloud cluster when an unmounting event of unmounting the target storage volume on the node is monitored; A recording module is used to record uninstallation information in a custom resource object of a node in a cloud cluster when the target storage volume is still mounted on the node, wherein the uninstallation information carries at least a target identity identifier ID of the target storage volume, and the uninstallation information is used to indicate that the target storage volume corresponding to the target ID has not been successfully uninstalled on the node in the cloud cluster.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the storage volume processing method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the storage volume processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Volume management method, system, equipment and medium

    CN113721850A

  • Method, device and equipment for processing unloaded volume exception and readable medium

    CN113806125A

  • Automatic cluster service discovery method and device, electronic equipment and readable storage medium

    CN116866412A

  • Fault recovery method, device and equipment and readable storage medium

    CN117591324A

  • Kubernetes environment application program configuration hot update mode

    CN117632209A