CN114706526A - Automatic capacity expansion method, system and equipment for cloud native storage data volume - Google Patents

Automatic capacity expansion method, system and equipment for cloud native storage data volume Download PDF

Info

Publication number
CN114706526A
CN114706526A CN202210212154.1A CN202210212154A CN114706526A CN 114706526 A CN114706526 A CN 114706526A CN 202210212154 A CN202210212154 A CN 202210212154A CN 114706526 A CN114706526 A CN 114706526A
Authority
CN
China
Prior art keywords
target
data volume
storage data
capacity expansion
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210212154.1A
Other languages
Chinese (zh)
Inventor
牛乐川
孙亮
戴秋萍
潘远航
郭峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Daoke Network Technology Co ltd
Original Assignee
Shanghai Daoke Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Daoke Network Technology Co ltd filed Critical Shanghai Daoke Network Technology Co ltd
Priority to CN202210212154.1A priority Critical patent/CN114706526A/en
Publication of CN114706526A publication Critical patent/CN114706526A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides an automatic capacity expansion method, system and device for a cloud native storage data volume. The method comprises the steps of obtaining storage state information of a target storage data volume corresponding to a target application, comparing the obtained storage state information with a target trigger condition in a target capacity expansion strategy, and expanding the capacity of the target storage data volume according to target capacity expansion operation in the target capacity expansion strategy when the target trigger condition is met, wherein the target capacity expansion strategy comprises preset configuration information used for adapting to storage requirements of the target application, so that the storage data volume corresponding to the target application can be automatically expanded by utilizing the preset configuration information in the target capacity expansion strategy to dynamically adapt to the storage requirements of the target application.

Description

Automatic capacity expansion method, system and equipment for cloud native storage data volume
Technical Field
The embodiment of the application relates to the field of cloud native storage, in particular to an automatic capacity expansion method, system and device for a cloud native storage data volume.
Background
In a cloud native scene, a Kubernetes system provides a mechanism for storing data volumes and rich plug-ins to achieve the problems of container data persistence and data sharing among containers, namely, data generated in the running process of an application deployed in a container group is stored in a storage data volume bound with the container group in a persistent mode.
The storage data volume mainly refers to a backend storage data volume, and specifically refers to a storage device located on a backend storage system independent of a kubernets cluster. However, as the containerized deployed application in the Kubernetes cluster continuously runs, more and more data are persistently stored in the bound storage data volume, so that capacity expansion operation needs to be performed on the storage data volume, otherwise once the available capacity of the storage data volume is exhausted, newly generated data cannot be continuously written, and the application is in an unavailable state.
Currently, there are generally two ways to expand a storage data volume: firstly, setting a special person on duty, accessing a rear-end storage system regularly, inquiring the residual available capacity of a storage data volume, and manually editing when the residual available capacity is insufficient to realize capacity expansion; secondly, a very large capacity value is preset, and the application can run for a long time without capacity expansion by providing enough residual available capacity.
However, the first expansion method has a technical problem that the manual monitoring efficiency is low and the manual editing operation is complicated, and the second expansion method has a technical problem that the storage resources are wasted.
Disclosure of Invention
The method, the system and the device for automatically expanding the cloud native storage data volume provided by the embodiment of the application are used for automatically expanding the storage data volume corresponding to the target application, so that the storage requirement of the target application is dynamically adapted.
In a first aspect, an embodiment of the present application provides an automatic capacity expansion method for a cloud-native storage data volume, including:
acquiring storage state information of a target storage data volume corresponding to a target application;
if the storage state information meets the target triggering condition in the target capacity expansion strategy, expanding the target storage data volume according to the target capacity expansion operation in the target capacity expansion strategy; the target capacity expansion strategy comprises preset configuration information used for adapting to the storage requirement of the target application.
Optionally, the obtaining storage state information of a target storage data volume corresponding to the target application includes:
acquiring a storage data volume declaration file corresponding to the target application;
determining the target storage data volume by parsing the storage data volume declaration file;
acquiring current use information of the target storage data volume through an application program interface; the application program interface is used for accessing a back-end storage system, the back-end storage system comprises the target storage data volume, and the storage state information comprises the current use information.
Optionally, the expanding the target storage data volume according to the target expansion operation in the target expansion policy includes:
configuring a demand capacity field in the storage data volume declaration file according to the target capacity expansion operation;
and expanding the target storage data volume according to the configured storage data volume declaration file.
Optionally, the automatic capacity expansion method for the cloud native storage data volume further includes:
acquiring current use information of all storage data volumes in the back-end storage system through the application program interface;
and writing the current use information of all the storage data volumes into a capacity expansion strategy resource file.
Optionally, before the obtaining of the storage state information of the target storage data volume corresponding to the target application, the method further includes:
analyzing the resource files of all the applications to acquire at least one target application marked with capacity expansion annotation information; and the capacity expansion annotation information is used for marking the storage requirement corresponding to the target application.
Optionally, after the obtaining of the at least one target application marked with the volume-expansion annotation information, the method further includes:
accessing a capacity expansion strategy resource file; at least one capacity expansion strategy is configured in the capacity expansion strategy resource file, and the capacity expansion strategy comprises a trigger condition and capacity expansion operation;
And determining the target capacity expansion strategy from the capacity expansion strategy resource file according to the capacity expansion annotation information of the target application.
Optionally, the determining the target volume expansion policy from the volume expansion policy resource file according to the volume expansion annotation information of the target application includes:
analyzing the expansion annotation information of the target application; the capacity expansion annotation information is used for marking the business type corresponding to the target application;
and binding the target application with the target capacity expansion strategy according to the service type corresponding to the target application.
In a second aspect, an embodiment of the present application further provides a method for configuring a capacity expansion policy of a cloud native storage data volume, including:
responding to a configuration instruction of a user to a target application, and determining a target trigger condition in a target capacity expansion strategy and configuration information of target capacity expansion operation; the target capacity expansion strategy is used for adapting to the storage requirement corresponding to the target application;
and writing the target capacity expansion strategy into a container cluster management system so that the container cluster management system expands a target storage data volume corresponding to the target application according to the target capacity expansion operation.
In a third aspect, an embodiment of the present application further provides a container cluster management system, including: the system comprises a storage data volume capacity expansion component, an application program interface and a plurality of applications;
the storage data volume expansion component acquires the storage state information of the storage data volume corresponding to each application through an application program interface of a back-end storage system; the back-end storage system comprises a target storage data volume corresponding to a target application in a plurality of applications;
and if the storage state information of the target storage data volume meets a target trigger condition in a target capacity expansion strategy, performing capacity expansion on the target storage data volume according to target capacity expansion operation in the target capacity expansion strategy, wherein the target capacity expansion strategy comprises preset configuration information for adapting to the storage requirement of the target application.
In a fourth aspect, an embodiment of the present application further provides a client device, including: a processor, a memory, and an input device;
the memory for storing a computer program for the processor;
the input device is used for acquiring a configuration instruction of a user on a target application;
the processor responds to the configuration instruction and determines a target trigger condition in a target capacity expansion strategy and configuration information of target capacity expansion operation; the target capacity expansion strategy is used for adapting to the storage requirement corresponding to the target application;
The processor is configured to write the target capacity expansion policy into a container cluster management system, so that the container cluster management system performs capacity expansion on the storage data volume according to the target capacity expansion operation.
In a fifth aspect, an embodiment of the present application further provides a machine-readable storage medium, on which executable instructions are stored, and when the executable instructions are executed by a machine, the method for automatically expanding a cloud-native storage data volume provided in the first aspect is implemented.
In a sixth aspect, the present application further provides a machine-readable storage medium, on which executable instructions are stored, and when executed by a machine, the executable instructions implement the capacity expansion policy configuration method for the cloud native storage data volume provided in the second aspect.
In a seventh aspect, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for automatically expanding a cloud-native storage data volume provided in the first aspect is implemented.
In an eighth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for configuring a capacity expansion policy of a cloud native storage data volume according to the second aspect is implemented.
It can be seen that, in the above technical solution, by obtaining the storage state information of the target storage data volume corresponding to the target application, and comparing the obtained storage state information with the target trigger condition in the target capacity expansion policy, when the target trigger condition is met, the storage data volume is expanded according to the target capacity expansion operation in the target capacity expansion policy, where the target capacity expansion policy includes preset configuration information for adapting to the storage requirement of the target application, so that the storage data volume corresponding to the target application can be automatically expanded by using the preset configuration information in the target capacity expansion policy, so as to dynamically adapt to the storage requirement of the target application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below. However, it should be understood by those skilled in the art that the drawings in the following description are illustrative of some examples of the application only and do not limit the scope thereof.
Fig. 1 is a flowchart illustrating an automatic capacity expansion method for a cloud native storage data volume according to an exemplary embodiment of the present application;
fig. 2 is a flowchart illustrating a method for automatically expanding a cloud native storage data volume according to another exemplary embodiment of the present application;
Fig. 3 is a flowchart illustrating an automatic capacity expansion method for a cloud native storage data volume according to yet another exemplary embodiment of the present application;
FIG. 4 is a logical schematic diagram illustrating a method for automatically expanding a storage volume according to an exemplary embodiment of the present application;
fig. 5 is a flowchart illustrating an automatic volume expansion method for a cloud native storage data volume according to yet another exemplary embodiment of the present application;
FIG. 6 is a logical schematic diagram illustrating a current usage information query of a storage data volume according to an illustrative embodiment of the present application;
fig. 7 is a flowchart illustrating a method for capacity expansion policy configuration of a cloud native storage data volume according to an exemplary embodiment of the present application;
FIG. 8 is a logical schematic diagram illustrating a capacity expansion policy configuration for a storage data volume according to an exemplary embodiment of the present application;
FIG. 9 is a logical schematic diagram illustrating a storage data volume expansion component according to an exemplary embodiment of the present application;
FIG. 10 is an architectural diagram of a container cluster management system shown herein in accordance with an exemplary embodiment;
FIG. 11 is an architectural diagram of a client device shown in the present application according to an exemplary embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It should be understood by those skilled in the art that the embodiments described are a part of the embodiments of the present invention, and not all embodiments. All other embodiments can be obtained by any suitable modification or variation by a person skilled in the art based on the embodiments in the present application.
In a cloud native scene, a Kubernetes system provides a mechanism for storing data volumes and rich plug-ins to achieve the problems of container data persistence and data sharing among containers, namely, data generated in the running process of an application deployed in a container group is stored in a storage data volume bound with the container group in a persistent mode. The Kubernetes system is used for managing containerized applications on a plurality of hosts in a cloud platform, and aims to enable the containerized applications to be deployed simply and efficiently provide a mechanism for deploying, planning, updating and maintaining the applications. In particular, multiple hosts in a cloud platform are managed in a cluster, known as a kubernets cluster.
When the container group is restarted by a Kubelet component in the Kubernetes system due to failure, the data persistently stored in the storage data volume cannot be cleaned, and the application in the restarted container group can continuously use the data in the bound storage data volume, so that the high reliability of the application is realized.
The storage data volume in the embodiment of the present application includes both a storage data volume located on a host in a kubernets cluster and a backend storage data volume, where the backend storage data volume specifically refers to a storage device located on a backend storage system independent of the kubernets cluster. For convenience of explanation, the embodiments of the present application are described with reference to a backend storage data volume as an example, but the embodiments of the present application are not limited thereto. It should be noted that the storage data volume is not a concrete physical storage device, but an abstract concept generated after abstract processing is performed on the physical storage device, so that the capacity of dynamic capacity expansion is provided.
However, as the containerized deployed application in the Kubernetes cluster continuously runs, more and more data are persistently stored in the bound storage data volume, so that capacity expansion operation needs to be performed on the storage data volume, otherwise once the available capacity of the storage data volume is exhausted, newly generated data cannot be continuously written, and the application is in an unavailable state. The capacity expansion refers to expanding the capacity of the storage data volume, and the capacity expansion of the storage data volume and the capacity expansion of the file system are required to be sequentially and respectively performed on the storage data volume in the kubernets cluster.
In addition, because the kubernets cluster does not provide a function of querying the remaining available capacity of the storage data volume, an application administrator cannot know the remaining available capacity of the storage data volume in the kubernets cluster in real time, and therefore, when capacity expansion operation is performed on the storage data volume in the backend storage system in the kubernets cluster at present, after the access authority of the backend storage system is acquired, the backend storage system needs to be accessed to query the remaining available capacity of each storage data volume. For a Storage data Volume with insufficient remaining available capacity, an application administrator manually edits a 'required capacity' field in a Storage data Volume declaration file (namely, a Persistent Volume Claim, a PVC file) corresponding to the Storage data Volume, a Container Storage Interface (CSI) completes capacity expansion operation on the Storage data Volume according to the modified Storage data Volume declaration file, and then a kubel component automatically completes capacity expansion on a file system according to the Storage data Volume after capacity expansion.
Based on this, in current production practice, there are generally two ways to expand a storage data volume: firstly, setting a special person on duty, accessing a rear-end storage system regularly, inquiring the residual available capacity of a storage data volume, and manually editing when the residual available capacity is insufficient, namely manually editing a required capacity field in a statement file of the storage data volume when the residual available capacity is insufficient, and expanding the storage data volume to realize capacity expansion; and secondly, a very large capacity value is preset, namely a very large value is preset for a 'required capacity' field in a storage data volume declaration file, so that the application does not need to be expanded after long-time running by providing enough residual available capacity. However, for the first capacity expansion method, in production practice, the backend storage system is usually provided by a storage manufacturer and managed by itself, and accessing the backend storage system needs to obtain authorization of a backend storage system administrator, which has technical problems of low manual monitoring efficiency and tedious manual editing operation, while for the second capacity expansion method, there is a technical problem of waste of storage resources.
In addition, in the two existing methods for expanding the storage data volume, the same expansion operation is performed on different storage data volumes, and the storage data volume is not individually expanded according to the storage requirement of the application bound with the storage data volume, so that the storage requirements of different applications cannot be met.
In order to overcome the defects of the capacity expansion mode adopted for storing the data volume in the existing production practice, the invention concept adopted by the application is as follows:
the storage state information of the target storage data volume corresponding to the target application is acquired, the acquired storage state information is compared with the target trigger condition in the target capacity expansion strategy, and when the target trigger condition is met, the storage data volume is expanded according to the target capacity expansion operation in the target capacity expansion strategy, wherein the target capacity expansion strategy comprises preset configuration information used for adapting the storage requirement of the target application, so that the storage data volume corresponding to the target application can be automatically expanded by utilizing the preset configuration information in the target capacity expansion strategy, and the storage requirement of the target application is dynamically adapted.
Specifically, in order to implement capacity expansion operation on a storage data volume using different capacity expansion policies according to a bound application, in the embodiment of the present application, a capacity expansion policy resource file and a capacity expansion component of a storage data volume that is deployed in a containerization manner are introduced into a kubernets system, the capacity expansion policy resource file is used to receive at least one capacity expansion policy written by an application administrator, the application administrator may bind a certain capacity expansion policy to the application that needs to perform automatic capacity expansion operation on the bound storage data volume by adding capacity expansion annotation information, and the capacity expansion component of the storage data volume is used to associate the capacity expansion policy that is bound to the application with the storage data volume that is bound to the application, and specifically execute the capacity expansion operation on the bound storage data volume that is used. In addition, the storage data volume expansion component is further configured to detect a current usage amount of the storage data volume bound to each application in real time, and record the current usage amount in the expansion policy resource file, so as to provide query for an application administrator.
Fig. 1 is a flowchart illustrating an automatic capacity expansion method for a cloud native storage data volume according to an exemplary embodiment of the present application. As shown in fig. 1, an automatic capacity expansion method for a cloud native storage data volume provided in an embodiment of the present application includes:
and step S101, acquiring the storage state information of the target storage data volume corresponding to the target application.
Specifically, an execution body of the method steps provided in the embodiment of the present application may be any container cluster management system, and optionally, may be a kubernets cluster management system, where the kubernets cluster management system is an application for managing containerization on multiple hosts in a cloud platform, so that the application for deploying the containerization can be managed simply and efficiently. The system comprises a container cluster management system, a target application and a storage data volume, wherein the container cluster management system can be used for deploying a plurality of applications, the applications which need to perform automatic capacity expansion operation on the bound storage data volume can be defined as the target applications, and correspondingly, the storage data volume for persistently storing data generated in the running process of the target applications can be defined as the target storage data volume. It should be noted that the determination of the target application may be preset, or may be automatically adjusted by the container cluster management system according to a change in the service requirement of each application, which is not limited in the embodiment of the present application.
Further, in this step, the storage state of the target storage data volume may be determined by obtaining the storage state information of the target storage data volume corresponding to the target application. The obtaining mode may be passive obtaining in response to a user operation, or automatic obtaining according to a preset obtaining time mechanism or a condition mechanism. The storage state information may be obtained by directly accessing the target storage data volume, or may be obtained indirectly by setting a corresponding file to store the storage state information of the target storage data volume and then accessing the file.
And step S102, if the storage state information meets the target trigger condition in the target capacity expansion strategy, expanding the capacity of the target storage data volume according to the target capacity expansion operation in the target capacity expansion strategy.
The target capacity expansion strategy comprises preset configuration information used for adapting to the storage requirement of the target application.
After the storage state information of the target storage data volume corresponding to the target application is acquired, whether the current storage state information meets a target trigger condition in a target capacity expansion strategy can be judged. Optionally, the corresponding target capacity expansion policy may be respectively bound according to the storage requirement of each target application, and the storage requirement may be distinguished according to the service type corresponding to the application, or may be separately defined for each application, or may be automatically generated according to the historical condition of data generated by the application.
After judging whether the current storage state information meets the target triggering condition in the target capacity expansion strategy or not, if the storage state information meets the target triggering condition in the target capacity expansion strategy, capacity expansion is carried out on the target storage data volume according to the target capacity expansion operation in the target capacity expansion strategy. And if the storage state information does not meet the target triggering condition in the target capacity expansion strategy, the capacity expansion of the target storage data volume is not needed.
In the embodiment of the application, by acquiring the storage state information of the target storage data volume corresponding to the target application, and comparing the acquired storage state information with the target trigger condition in the target capacity expansion policy, when the target trigger condition is met, the storage data volume is subjected to capacity expansion according to the target capacity expansion operation in the target capacity expansion policy, where the target capacity expansion policy includes preset configuration information used for adapting to the storage requirement of the target application, so that the storage data volume corresponding to the target application can be automatically expanded by using the preset configuration information in the target capacity expansion policy, so as to dynamically adapt to the storage requirement of the target application.
Fig. 2 is a flowchart illustrating an automatic capacity expansion method for a cloud native storage data volume according to another exemplary embodiment of the present application. As shown in fig. 2, an automatic capacity expansion method for a cloud native storage data volume provided in an embodiment of the present application includes:
Step S201, obtaining a storage data volume declaration file corresponding to the target application.
To obtain the storage state information of the target storage data volume corresponding to the target application in step S101, the target storage data volume corresponding to the target application is determined first, and then the storage state information of the target storage data volume is obtained.
In the Kubernetes cluster management system, a target application and a target storage data volume are bound through a storage data volume declaration file corresponding to the target application, and specifically, the target application and the target storage data volume are bound through the content of the storage data volume declaration file. Therefore, to determine the target storage data volume, the storage data volume declaration file corresponding to the target application needs to be obtained first.
And step S202, determining a target storage data volume by analyzing the storage data volume declaration file.
Based on the foregoing description, it can be known that the target application and the target storage data volume can be bound by the content of the storage field in the storage data volume declaration file corresponding to the target application, and therefore, the target storage data volume corresponding to the target application can be determined by analyzing the content of the storage field in the storage data volume declaration file corresponding to the target application.
And step S203, acquiring the current use information of the target storage data volume through the application program interface.
The Application Programming Interface (API) is configured to access a back-end storage system, where the back-end storage system includes a target storage data volume, and storage state information of the target storage data volume includes current usage information of the target storage data volume.
Based on the foregoing description, it can be seen that the embodiments of the present application are described by taking a backend storage data volume as an example, and the backend storage data volume refers to a storage device located on a backend storage system independent of a kubernets cluster. Therefore, the kubernets cluster management system cannot directly access the target storage data volume located in the backend storage system, and needs to acquire the current use information of the target storage data volume located on the backend storage system through an application program interface provided by the backend storage system.
Specifically, the current usage information of the target storage data volume may specifically include a current usage rate of the target storage data volume, that is, a ratio of the current usage rate of the target storage data volume to the total capacity of the target storage data volume.
In addition, the current usage information may further include at least one of a current remaining amount, a current remaining rate, a usage increase rate, and a remaining decrease rate. The current remaining amount is the remaining available capacity of the target storage data volume, the current remaining rate is the ratio of the remaining available capacity of the target storage data volume to the total capacity of the target storage data volume, the usage increase rate is the ratio of the increase amount of the usage of the target storage data volume per unit time to the current usage, and the remaining decrease rate is the ratio of the decrease amount of the remaining available capacity of the target storage data volume per unit time to the remaining available capacity.
And step S204, if the current use information meets the target trigger condition in the target capacity expansion strategy, configuring a required capacity field in the storage data volume declaration file according to the target capacity expansion operation, and expanding the target storage data volume according to the configured storage data volume declaration file.
Based on the foregoing, it can be appreciated that the current usage information can include at least one of a current usage rate, a current amount remaining, a current remaining rate, an increase rate of usage, and a decrease rate remaining for the target storage data volume.
Accordingly, the target trigger condition needs to match with the corresponding category of the current usage information, such as: the current usage information is specifically a current usage rate of the target storage data volume, and if the current usage rate of the target storage data volume is greater than or equal to a preset usage rate threshold (for example, 80%), the storage space of a preset number (for example, 100G) is expanded or the storage space of a preset proportion (for example, 20%) of the existing capacity is expanded for the target storage data volume, which is not limited in the embodiment of the present application. For another example: the current usage information is specifically a usage growth rate of the target storage data volume, and if the usage growth rate of the target storage data volume is greater than or equal to a preset usage growth rate threshold (for example, 5%), the target storage data volume is expanded by a storage space of a preset value (for example, 100G) or by a storage space of a preset proportion (for example, 20%) of an existing capacity, which is not limited in this embodiment of the application.
Further, the target trigger condition in the embodiment of the present application may be determined independently by using one index in the current usage information, or may be determined comprehensively by using multiple indexes in the current usage information. Such as: the current usage information is specifically a current usage rate and a usage growth rate of the target storage data volume, and if the current usage rate of the target storage data volume is greater than or equal to a preset usage rate threshold (for example, 80%), and the usage growth rate of the target storage data volume is greater than or equal to a preset usage growth rate threshold (for example, 5%), the storage space of a preset number (for example, 500G) is expanded or the storage space of a preset proportion (for example, 50%) of the existing capacity is expanded for the target storage data volume, which is not limited in this embodiment of the present application.
It can be understood that, when the current usage information satisfies the target trigger condition in the target volume expansion policy, the value of the storage space of the target storage data volume that needs to be expanded may be determined according to the target volume expansion operation corresponding to the target trigger condition in the target volume expansion policy, and then the required capacity field in the storage data volume declaration file is configured according to the value of the storage space of the target storage data volume that needs to be expanded, and the target storage data volume is expanded according to the configured storage data volume declaration file.
Based on the foregoing description, it can be known that, in the kubernets cluster management system, the storage data volume declaration file is used to bind the target application and the target storage data volume, and the required capacity field in the storage data volume declaration file is used to define the size of the storage space of the target storage data volume, so that the value of the required capacity field in the storage data volume declaration file is increased, and the CSI plugin of the kubernets cluster management system automatically performs capacity expansion on the target storage data volume according to the configured storage data volume declaration file to complete capacity expansion operation on the target storage data volume, and then automatically completes capacity expansion on the file system according to the target storage data volume after capacity expansion by the Kubelet component of the kubernets cluster management system.
In the embodiment of the application, a storage data volume declaration file corresponding to a target application is obtained first, then the storage data volume declaration file is analyzed to determine a target storage data volume, and then current use information of the target storage data volume is obtained through an application program interface provided by a back-end storage system. And when the current use information of the target storage data volume meets a target trigger condition in a target capacity expansion strategy, configuring a required capacity field in the storage data volume declaration file according to target capacity expansion operation, and expanding the capacity of the target storage data volume according to the configured storage data volume declaration file. Therefore, the storage data volume declaration file corresponding to the target application is analyzed and automatically configured in the Kubernetes cluster management system, and the target storage data volume corresponding to the target application is automatically expanded.
Fig. 3 is a flowchart illustrating an automatic capacity expansion method for a cloud native storage data volume according to yet another exemplary embodiment of the present application. As shown in fig. 3, an automatic capacity expansion method for a cloud native storage data volume provided in an embodiment of the present application includes:
step S301, analyzing the resource files of all the applications to obtain at least one target application marked with the capacity expansion annotation information.
And the capacity expansion annotation information is used for marking the storage requirement corresponding to the target application.
Based on the foregoing description, it can be seen that in the embodiment of the present application, an application that needs to perform an automatic capacity expansion operation on a bound storage data volume is defined as a target application, so that a container cluster management system can identify, from all applications, the application that needs to perform the automatic capacity expansion operation on the bound storage data volume, and perform the capacity expansion operation on the application as the target application. The method and the device for automatically expanding the volume of the storage data volume label mark the application which needs to automatically expand the volume of the bound storage data volume by adding the expansion annotation information to the application, namely the application marked with the expansion annotation information is the target application in the embodiment of the application.
It can be understood that the expansion annotation information refers to expansion information in an annotation form added in a resource file of an application, and is used for marking that automatic expansion needs to be performed on a storage data volume bound by the application.
Therefore, the resource files of all the applications deployed on the container cluster management system are analyzed, the resource files with the capacity expansion annotation information are screened out, and then all the target applications can be screened out from all the applications.
In addition, for different storage requirements corresponding to different target applications, different expansion annotation information can be used for labeling, so that the storage requirements of the different target applications are distinguished through the expansion annotation information, and further the different expansion annotation information is adapted to different expansion strategies.
In brief, in the embodiment of the present application, the preset configuration information (including the trigger condition and the capacity expansion operation) in different capacity expansion policies is adapted to different storage requirements, and the different storage requirements are marked by different capacity expansion annotation information, so that the capacity expansion annotation information marked by the target application substantially binds the target application with a certain capacity expansion policy by marking the storage requirements.
Further, the embodiment of the application may adopt different manners to label the storage requirement corresponding to the target application with the volume-expanding annotation information. In the first mode, the capacity-expansion annotation information can be used for marking the service type corresponding to the target application to indirectly mark the storage requirement of the target application, for example, the service type corresponding to the target application can be divided into financial service, e-commerce service, video service and manufacturing system service. Therefore, different trigger conditions need to be configured for the corresponding target storage data volume according to the service type corresponding to the target application, and different capacity expansion operations need to be adopted. Correspondingly, different business types are marked on different target applications, the business types are associated with storage requirements, and the storage requirements corresponding to the target applications can be determined by determining the business types corresponding to the target applications. The second mode can directly mark the storage requirement of the target application by using the capacity expansion annotation information, specifically can divide the storage requirement into a persistent high storage requirement, a persistent low storage requirement, a temporary high storage requirement and a temporary low storage requirement, and marks different names of the storage requirements for the target applications with different storage requirements, so as to determine the storage requirement corresponding to the target application. The third method may use the expansion annotation information to label the target expansion policy corresponding to the target application, and based on the foregoing description, it can be known that, in the embodiment of the present application, the target application is bound to a certain expansion policy by labeling the storage requirement, so that names of the target expansion policies corresponding to different target applications are labeled, that is, the target application and the corresponding target expansion policy can be directly bound.
And step S302, accessing the capacity expansion strategy resource file.
The capacity expansion strategy resource file is configured with at least one capacity expansion strategy, and the capacity expansion strategy comprises a trigger condition and capacity expansion operation.
It should be understood that, in the embodiment of the present application, the capacity expansion policy is configured by deploying the capacity expansion policy resource file in the container cluster management system, and each of the capacity expansion policies specifically includes a trigger condition and a corresponding capacity expansion operation.
Therefore, all the expansion strategies configured in the container cluster management system can be obtained by accessing the expansion strategy resource file.
Step S303, determining a target capacity expansion strategy from the capacity expansion strategy resource file according to the capacity expansion annotation information of the target application.
Based on the foregoing description, it can be known that the volume expansion annotation information in the embodiment of the present application is used to mark the storage requirement corresponding to the target application, and the trigger conditions and the volume expansion operations in different volume expansion policies are adapted to different storage requirements, so that after the storage requirement of the target application is determined according to the volume expansion annotation information of the target application, the target volume expansion policy adapted to the storage requirement corresponding to the target application can be further determined from all volume expansion policies in the volume expansion policy resource file.
If the volume expansion annotation information marks the business type corresponding to the target application, the volume expansion annotation information of the target application is analyzed to obtain the business type corresponding to the target application, and then the target application is bound with the target volume expansion strategy according to the business type corresponding to the target application.
Or, if the storage requirement of the target application is marked by the capacity expansion annotation information, the storage requirement of the target application can be obtained after the capacity expansion annotation information of the target application is analyzed, and then the target application is bound with the target capacity expansion strategy according to the storage requirement of the target application.
Or, if the expansion annotation information of the target application directly marks the name of the target expansion policy corresponding to the target application, the target expansion policy corresponding to the target application may be directly determined from all the expansion policies in the expansion policy resource file.
And step S304, acquiring a storage data volume declaration file corresponding to the target application.
Step S305, determining a target storage data volume by analyzing the storage data volume declaration file.
And step S306, acquiring the current use information of the target storage data volume through the application program interface.
Step S307, if the current usage information meets the target trigger condition in the target capacity expansion policy, configuring a required capacity field in the storage data volume declaration file according to the target capacity expansion operation, and performing capacity expansion on the target storage data volume according to the configured storage data volume declaration file.
It should be noted that the foregoing explanation on step S201 to step S204 in the above embodiment also applies to step S301 to step S307 in the embodiment of the present application, and is not repeated here.
In the embodiment of the application, the target application marked with the capacity expansion annotation information is identified by analyzing the resource files of all the applications, so that the target application is distinguished from other applications in the container cluster management system by using the capacity expansion annotation information, and the target application is bound with a target capacity expansion strategy according to the capacity expansion annotation information, so that the container cluster management system can automatically expand the capacity of the target application subsequently.
Fig. 4 is a logic diagram illustrating an automatic capacity expansion method for a storage data volume according to an exemplary embodiment of the present application. As shown in fig. 4, in order to implement the automatic capacity expansion method for the cloud native storage data volume in the foregoing embodiment, capacity expansion policy resource files and storage data volume capacity expansion components may be deployed in a kubernets cluster in a containerized manner, where the storage data volume capacity expansion components are deployed in a DaemonSet form, and a DaemonSet controller can ensure that a copy of one storage data volume capacity expansion component is run on each (or specified) node, so that the storage data volume capacity expansion components have a high availability characteristic.
When the application manager deploys the application, the application manager can mark the corresponding service type for the application by adding the capacity expansion annotation information.
The storage data volume capacity expansion component can acquire resource files of all applications by accessing the API-Server component of the Kubernets cluster, analyze the resource files, and screen out the applications marked with capacity expansion annotation information as target applications. The storage data volume expansion component can obtain all configured expansion strategies by accessing the expansion strategy resource file, and determine a target expansion strategy corresponding to the target application from the expansion strategy resource file according to the expansion annotation information of the target application, so as to bind the target application and the corresponding target expansion strategy according to the service type corresponding to the target application.
The storage data volume expansion component can acquire the storage data volume declaration file corresponding to the target application by accessing the API-Server component of the Kubernets cluster, analyze the storage data volume declaration file and determine the target storage data volume corresponding to the target application. And the storage data volume expansion component can acquire the current use information of the target storage data volume on the back-end storage system through an application program interface provided by the back-end storage system.
And when the current utilization rate of the target storage data volume corresponding to the target application exceeds 80%, the storage data volume capacity expansion component increases the value of the demand capacity field in the storage data volume declaration file by 100G. And then, the CSI plug-in the Kubernets cluster management system expands the target storage data volume according to the content of the modified storage data volume declaration file, and the Kubelet component in the Kubernets cluster management system expands the capacity of the file system according to the expanded storage data volume.
In the foregoing embodiments, the automatic capacity expansion method for cloud-native storage data volumes provided by the present application achieves that, when the storage state information of the target application satisfies the target trigger condition in the target capacity expansion policy corresponding to the target application, the target storage data volume corresponding to the target application is automatically subjected to capacity expansion according to the target capacity expansion operation in the target capacity expansion policy. Fig. 5 is a flowchart illustrating an automatic capacity expansion method for a cloud native storage data volume according to still another exemplary embodiment of the present application. As shown in fig. 5, in order to enable an application administrator to query current usage information of storage data volumes corresponding to all applications in a container cluster management system, the automatic capacity expansion method for a cloud native storage data volume provided in the embodiment of the present application further includes:
Step S401, obtaining current usage information of all storage data volumes in the back-end storage system through the application program interface.
All storage data volumes in the back-end storage system refer to all storage data volumes bound with containerized deployed applications deployed in the container cluster management system.
It should be noted that, in the embodiment of the present application, a storage data volume located in a backend storage system is taken as an example for description, and to acquire current usage information of a storage data volume located on a host in a kubernets cluster, the host may be directly accessed by a container cluster management system.
Further, in order to enable an application administrator to query current usage information of all storage data volumes in time, in the embodiment of the present application, the container cluster management system may be configured to periodically actively access the backend storage system through an application program interface provided by the backend storage system.
And step S402, writing the current use information of all the storage data volumes into the capacity expansion strategy resource file.
It should be understood that, when an application administrator accesses the container cluster management system through the client device, the application administrator cannot directly access the back-end storage system, so that in the embodiment of the present application, the obtained current usage information of all the storage data volumes is written into the capacity expansion policy resource file, and the application administrator accesses the capacity expansion policy resource file through the client device to perform query, that is, the current usage information of all the storage data volumes can be queried.
In the embodiment of the application, the current use information of all storage data volumes in the back-end storage system is obtained through the application program interface, and the current use information of all storage data volumes is written into the capacity expansion strategy resource file, so that an application administrator can query the current use information of the storage data volumes corresponding to all applications in the container cluster management system.
In addition, the current usage information of the storage data volume in the kubernets cluster is synchronized to the file system, so that to acquire the current usage information of the storage data volume corresponding to each application, the current usage information may be acquired by accessing the file system in the kubernets cluster in addition to directly accessing the backend storage system, which is not limited in this embodiment of the present application.
FIG. 6 is a logical schematic diagram illustrating a current usage information query of a storage data volume according to an illustrative embodiment of the present application. As shown in fig. 6, in order to query the current usage information of all storage data volumes in the foregoing embodiment, capacity expansion policy resource files and storage data volume capacity expansion components may be deployed in a kubernets cluster in a containerized manner, and the storage data volume capacity expansion components may acquire storage data volume declaration files corresponding to all applications by accessing an API-Server component of the kubernets cluster where the storage data volume expansion components are located, analyze the storage data volume declaration files, and determine storage data volumes corresponding to each application. And the storage data volume expansion component can acquire the current use information of all the storage data volumes on the back-end storage system through an application program interface provided by the back-end storage system, and write the current use information of all the storage data volumes into the expansion strategy resource file. An application administrator can query the current use information of the storage data volume corresponding to each application respectively by accessing the capacity expansion strategy resource file through the client device.
In particular, the application administrator may obtain the query instruction through the client device, where the query instruction may be a visual operation page or triggered in the form of a command line. The client device responds to the query instruction, accesses the capacity expansion strategy resource file, queries the current use information of the storage data volume corresponding to each application stored in the capacity expansion strategy resource file, and displays the current use information through the visual operation page of the client device.
It should be particularly noted that, in the embodiment of the present application, the storage data volume expansion component further supports a standard index format, so that the capacity information and the current usage information of the storage data volume can be provided for other components.
Based on the foregoing description, it can be known that, in the embodiment of the present application, an application administrator binds an application to a certain expansion policy in an expansion policy resource file by adding expansion annotation information to the application, and in order to meet actual requirements of different applications, the expansion policy in the expansion policy resource file should allow the application administrator to manually add the expansion policy.
Fig. 7 is a flowchart illustrating a method for configuring a capacity expansion policy of a cloud native storage data volume according to an exemplary embodiment of the present application. As shown in fig. 7, in order to enable an application administrator to add a new expansion policy to an expansion policy resource file, a method for configuring an expansion policy of a cloud native storage data volume according to an embodiment of the present application includes:
And step S501, acquiring a configuration instruction of a user to the target application.
Based on the foregoing description, it can be known that, after an application administrator deploys a target application in a container cluster management system, if there is no adaptive capacity expansion policy in a capacity expansion policy resource file, the embodiment of the application allows the application administrator to configure a new capacity expansion policy for the target application.
The application administrator may input a configuration instruction for the target application according to the service type, storage requirement, and the like of the target application, so as to configure the trigger condition adapted to the target application and the capacity expansion operation.
Step S502, responding to a configuration instruction of a user to a target application, and determining a target trigger condition in a target capacity expansion strategy and configuration information of target capacity expansion operation.
And the target capacity expansion strategy is used for adapting to the storage requirement corresponding to the target application.
After receiving a configuration instruction of a user to a target application, integrating configuration information corresponding to the configuration instruction to obtain a target trigger condition in a target capacity expansion strategy corresponding to the target application and configuration information of target capacity expansion operation.
Step S503, writing the target capacity expansion policy into the cluster management system, so that the container cluster management system expands the target storage data volume according to the target capacity expansion operation.
In order to enable the target expansion policy added by the application administrator to be effective for a target application for a long time, the embodiment of the present application writes the target expansion policy into an expansion policy resource file in the cluster management system.
Further, when the target capacity expansion policy is written into the capacity expansion policy resource file, the application administrator may set at least one target capacity expansion policy in a manner of a visual operation page or a command line of the client device and store the target capacity expansion policy in the capacity expansion policy resource file, that is, the configuration instruction of the user to the target application may be implemented in a manner of a visual operation page or a command line. It is emphasized that the application administrator may configure the target triggering condition and the target capacity expansion operation in the target capacity expansion policy according to the storage requirement corresponding to the target application.
Fig. 8 is a logic diagram illustrating a capacity expansion policy configuration of a storage data volume according to an exemplary embodiment of the present application. As shown in fig. 8, in order to enable the application administrator to add a new expansion policy to the expansion policy resource file, the application administrator may set at least one target expansion policy in a manner of a visual operation page or a command line of the client device, and store the target expansion policy in the expansion policy resource file. Then, the application administrator adds the expansion annotation information corresponding to the newly added target expansion policy to the target application, and the target application and the newly added target expansion policy can be bound.
After the target application is deployed, the storage data volume expansion component acquires the resource file of the target application by accessing the API-Server component of the Kubernets cluster, and determines a newly-added target expansion strategy corresponding to the target application from the expansion strategy resource file according to the expansion annotation information of the target application.
And the storage data volume capacity expansion component acquires a storage data volume declaration file corresponding to the target application by accessing the API-Server component of the Kubernets cluster, analyzes the storage data volume declaration file, determines a target storage data volume corresponding to the target application, and acquires the current use information of the target storage data volume on the back-end storage system through an application program interface provided by the back-end storage system.
And when the current use information of the target storage data volume corresponding to the target application meets the target trigger condition in the newly added target capacity expansion strategy, configuring a required capacity field in the storage data volume statement file according to the target capacity expansion operation. And then, the CSI plug-in the Kubernets cluster management system expands the target storage data volume according to the content of the modified storage data volume declaration file, and the Kubelet component in the Kubernets cluster management system expands the capacity of the file system according to the expanded storage data volume.
FIG. 9 is a logical schematic diagram illustrating a storage data volume expansion component according to an exemplary embodiment of the present application. As shown in fig. 9, the storage data volume expansion component in this embodiment may specifically include a expansion policy parser, an application monitor, an operator, a capacity expansion executor, a usage collector, and other components.
The capacity expansion strategy parser is used for parsing the content of the capacity expansion strategy resource file and determining the triggering condition and the capacity expansion operation in each capacity expansion strategy.
The application monitor is used for accessing an API-Server component of the Kubernets cluster to obtain the applications bound with the capacity expansion strategies, using the applications as target applications, determining the target capacity expansion strategies corresponding to each target application by analyzing the capacity expansion annotation information corresponding to the target applications, and determining the target storage data volumes respectively bound by each target application by analyzing the storage data volume statement files corresponding to the target applications.
The usage collector is used for accessing an API (application programming interface) provided by the back-end storage system to acquire current use information of the target storage data volumes respectively bound by each target application, acquiring current use information of the storage data volumes bound by each application, and writing the current use information of the storage data volumes bound by each application into the capacity expansion strategy resource file.
The arithmetic unit is used for judging whether the capacity expansion operation needs to be carried out on the target storage data volume bound by the target application or not according to the target capacity expansion strategy bound by the target application and the current use information of the target storage data volume, and calculating the capacity which needs to be increased when the capacity expansion operation is carried out on the target storage data volume.
The capacity expansion executor is used for modifying a required capacity field in the storage data volume declaration file corresponding to the target application.
In summary, in the embodiment of the present application, an application administrator may write a capacity expansion policy into a capacity expansion policy resource file through a client, bind a target capacity expansion policy to a target application in a manner of adding capacity expansion annotation information when the target application is deployed, and associate the target capacity expansion policy bound to the target application with a target storage data volume bound to the target application, so as to set an appropriate target capacity expansion policy to the target storage data volume according to a service type of the bound target application, and execute a target capacity expansion operation, so that the target capacity expansion policy applicable to the target storage data volume meets a requirement of the service type of the target application.
Secondly, binding of the target application and the target storage data volume can be automatically completed according to the content of the storage data volume statement file, then, a target capacity expansion strategy bound by the target application and the target storage data volume are automatically bound according to capacity expansion annotation information of the target application, and when the storage state information of the target storage data volume meets a target trigger condition in the target capacity expansion strategy, target capacity expansion operation is automatically executed, capacity expansion operation on the target storage data volume is automatically completed, and manual intervention is not needed.
And thirdly, the capacity expansion component of the storage data volume modifies the required capacity field in the statement file of the storage data volume, the CSI plug-in completes the capacity expansion operation of the target storage data volume according to the modified statement file of the storage data volume, and the Kubelet component automatically completes the capacity expansion of the file system according to the expanded target storage data volume, so that the related technology of capacity expansion of the storage data volume in the Kubernets system is fully utilized, the existing Kubernets system is low in invasiveness, and the difficulty in realizing the whole scheme is reduced.
And repeatedly, the application manager only needs to preset the target capacity expansion strategy and bind the target capacity expansion strategy for the target application. When the target storage data volume bound by the target application meets the target trigger condition in the bound target capacity expansion strategy, the storage data volume capacity expansion component automatically performs refined capacity expansion on the target storage data volume without manual watching.
Fig. 10 is an architectural diagram of a container cluster management system shown herein according to an example embodiment. As shown in fig. 10, a container cluster management system provided in an embodiment of the present application includes: a storage data volume capacity expansion component 602, a capacity expansion policy resource file 603 and a plurality of applications 601;
The storage data volume expansion component 602 acquires storage state information of a storage data volume corresponding to each application through an application program interface of a back-end storage system, where the back-end storage system includes a target storage data volume corresponding to a target application in multiple applications;
and if the storage state information of the target storage data volume meets the target triggering condition in the target capacity expansion strategy, performing capacity expansion on the target storage data volume according to the target capacity expansion operation in the target capacity expansion strategy, wherein the target capacity expansion strategy comprises preset configuration information for adapting to the storage requirement of the target application.
Optionally, the container cluster management system may specifically include a capacity expansion policy resource file and a capacity expansion component for storing a data volume, which are deployed on a kubernets cluster, where the kubernets cluster includes a CSI plugin and multiple applications;
each target application is deployed with expansion annotation information matched with the service type of the target application and used for binding a certain target expansion strategy;
the capacity expansion strategy resource file is used for setting and storing a target capacity expansion strategy through the client;
the storage data volume expansion component is used for acquiring a target application bound with a corresponding target expansion strategy, analyzing expansion annotation information of the target application to determine a target expansion strategy and a storage data volume statement file bound by the target application, and determining a target storage data volume bound by the target application according to the storage data volume statement file;
The storage data volume capacity expansion component is also used for determining the triggering condition and capacity expansion operation of the capacity expansion strategy according to the capacity expansion strategy resource file;
the storage data volume capacity expansion component is also used for acquiring the utilization rate of the storage data volume bound by the application and judging whether the utilization rate reaches the triggering condition of the application or not, if not, the operation is not carried out, and if so, the required capacity field in the statement file of the storage data volume bound by the application is modified according to the capacity expansion strategy bound by the application;
and the CSI plug-in is used for carrying out capacity expansion operation on the storage data volume according to the modified storage data volume declaration file.
Optionally, the storage data volume expansion component is deployed on the kubernets cluster in a DaemonSet manner, and the storage data volume expansion component obtains the application bound with the corresponding expansion policy by accessing the API-server component in the kubernets cluster.
Optionally, the storage data volume expansion component may specifically include an expansion policy parser, an application monitor, an operator, an expansion executor, and a volume collector;
the application monitor is used for acquiring the application bound with the corresponding expansion strategy by accessing an API-Sever component in the Kubernets cluster, analyzing expansion annotation information of the application to determine the expansion strategy bound with the application and the storage data volume statement file, and determining the storage data volume bound with the application according to the storage data volume statement file;
The capacity expansion strategy parser is used for determining the triggering condition and the capacity expansion operation of each capacity expansion strategy according to the capacity expansion strategy resource file;
the usage collector is used for acquiring current usage information of a target storage data volume corresponding to the target application;
the arithmetic unit is used for judging whether the current use information of the target storage data volume reaches a target trigger condition in a target capacity expansion strategy bound by the target application, if not, the arithmetic unit does not operate, and if so, the arithmetic unit feeds back the capacity which needs to be increased for capacity expansion of the target storage data volume to the capacity expansion actuator;
the capacity expansion executor is used for modifying a required capacity field in a storage data volume declaration file of the application.
Optionally, the storage data volume expansion component is further configured to determine all storage data volumes according to the storage data volume declaration file, acquire current usage information of all storage data volumes, and write the current usage information of all storage data volumes into the expansion policy resource file.
In the embodiment of the present application, the division of the components is only one logical function division, and there may be another division manner in actual implementation. For example, multiple components may be combined or may be integrated into another system. In addition, the coupling between the respective components may be a direct coupling or an indirect coupling. In addition, functional components in the embodiments of the present application may be integrated into one processing module, or may exist separately and physically.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a machine-readable storage medium. Therefore, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a machine-readable storage medium and may include several instructions to cause a terminal device to execute all or part of the processes of the technical solution described in the embodiments of the present application. The storage medium may include various media that can store program codes, such as ROM, RAM, a removable disk, a hard disk, a magnetic disk, or an optical disk.
FIG. 11 is an architectural diagram of a client device shown in the present application according to an example embodiment. As shown in fig. 11, a client device 700 provided in an embodiment of the present application includes: a processor 701, a memory 702, and an input device 703;
the memory 702 is used for storing a computer program of the processor 701;
the input device 703 is used for acquiring a configuration instruction of a user on a target application;
the processor 701, in response to the configuration instruction, determines a target trigger condition in a target capacity expansion policy and configuration information of a target capacity expansion operation, where the target capacity expansion policy is used to adapt to a storage requirement corresponding to the target application;
The processor 701 is configured to write the target capacity expansion policy into a container cluster management system, so that the container cluster management system performs capacity expansion on the storage data volume according to the target capacity expansion operation.
The embodiment of the application also provides a machine-readable storage medium. The machine-readable storage medium may store executable instructions that, when executed by a machine, cause the machine to perform the specific processes in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart of the embodiments of the present disclosure. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means, or installed from a storage means, or installed from a ROM. The computer program performs the method steps in the embodiments of the present application when executed by a processor.
The machine-readable storage medium described above in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
Furthermore, those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The foregoing is merely exemplary embodiments of the present application and the scope of the present application is not limited thereto. Those skilled in the art can make changes or substitutions within the technical scope disclosed in the present application, and such changes or substitutions should be within the protective scope of the present application.

Claims (10)

1. An automatic capacity expansion method for a cloud native storage data volume is characterized by comprising the following steps:
acquiring storage state information of a target storage data volume corresponding to a target application;
if the storage state information meets a target trigger condition in a target capacity expansion strategy, expanding the capacity of the target storage data volume according to target capacity expansion operation in the target capacity expansion strategy; the target capacity expansion strategy comprises preset configuration information used for adapting to the storage requirement of the target application.
2. The method according to claim 1, wherein the obtaining storage state information of the target storage data volume corresponding to the target application includes:
acquiring a storage data volume declaration file corresponding to the target application;
determining the target storage data volume by parsing the storage data volume declaration file;
acquiring current use information of the target storage data volume through an application program interface; the application program interface is used for accessing a back-end storage system, the back-end storage system comprises the target storage data volume, and the storage state information comprises the current use information.
3. The method according to claim 2, wherein the expanding the target storage data volume according to a target expansion operation in the target expansion policy includes:
configuring a demand capacity field in the storage data volume declaration file according to the target capacity expansion operation;
and expanding the target storage data volume according to the configured storage data volume declaration file.
4. The method for automatically expanding the cloud-native storage data volume according to claim 2 or 3, further comprising:
Acquiring current use information of all storage data volumes in the back-end storage system through the application program interface;
and writing the current use information of all the storage data volumes into a capacity expansion strategy resource file.
5. The automatic capacity expansion method for the cloud-native storage data volume according to any one of claims 1 to 3, further comprising, before the obtaining storage state information of a target storage data volume corresponding to a target application:
analyzing the resource files of all the applications to obtain at least one target application marked with capacity expansion annotation information; and the expansion annotation information is used for marking the storage requirement corresponding to the target application.
6. The automatic volume expansion method for the cloud-native storage data volume according to claim 5, further comprising, after the obtaining at least one target application marked with volume expansion annotation information:
accessing a capacity expansion strategy resource file; at least one expansion strategy is configured in the expansion strategy resource file, and the expansion strategy comprises a trigger condition and an expansion operation;
and determining the target capacity expansion strategy from the capacity expansion strategy resource file according to the capacity expansion annotation information of the target application.
7. The method of claim 6, wherein the determining the target volume expansion policy from the volume expansion policy resource file according to the volume expansion annotation information of the target application includes:
analyzing the expansion annotation information of the target application; the expansion annotation information is used for marking the service type corresponding to the target application;
and binding the target application with the target capacity expansion strategy according to the service type corresponding to the target application.
8. A capacity expansion strategy configuration method for a cloud native storage data volume is characterized by comprising the following steps:
responding to a configuration instruction of a user to a target application, and determining a target trigger condition and configuration information of target capacity expansion operation in a target capacity expansion strategy; the target capacity expansion strategy is used for adapting to the storage requirement corresponding to the target application;
and writing the target capacity expansion strategy into a container cluster management system so that the container cluster management system expands a target storage data volume corresponding to the target application according to the target capacity expansion operation.
9. A container cluster management system, comprising: the system comprises a storage data volume capacity expansion component and a plurality of applications;
The storage data volume capacity expansion component acquires the storage state information of the storage data volume corresponding to each application through an application program interface of a back-end storage system; the back-end storage system comprises a target storage data volume corresponding to a target application in the plurality of applications;
and if the storage state information of the target storage data volume meets a target trigger condition in a target capacity expansion strategy, performing capacity expansion on the target storage data volume according to target capacity expansion operation in the target capacity expansion strategy, wherein the target capacity expansion strategy comprises preset configuration information for adapting to the storage requirement of the target application.
10. A client device, comprising: a processor, a memory, and an input device;
the memory for storing a computer program for the processor;
the input device is used for acquiring a configuration instruction of a user on a target application;
the processor responds to the configuration instruction and determines a target trigger condition in a target capacity expansion strategy and configuration information of target capacity expansion operation; the target capacity expansion strategy is used for adapting to the storage requirement corresponding to the target application;
the processor is configured to write the target capacity expansion policy into a container cluster management system, so that the container cluster management system expands a target storage data volume according to the target capacity expansion operation.
CN202210212154.1A 2022-03-01 2022-03-01 Automatic capacity expansion method, system and equipment for cloud native storage data volume Pending CN114706526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210212154.1A CN114706526A (en) 2022-03-01 2022-03-01 Automatic capacity expansion method, system and equipment for cloud native storage data volume

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210212154.1A CN114706526A (en) 2022-03-01 2022-03-01 Automatic capacity expansion method, system and equipment for cloud native storage data volume

Publications (1)

Publication Number Publication Date
CN114706526A true CN114706526A (en) 2022-07-05

Family

ID=82166892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210212154.1A Pending CN114706526A (en) 2022-03-01 2022-03-01 Automatic capacity expansion method, system and equipment for cloud native storage data volume

Country Status (1)

Country Link
CN (1) CN114706526A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116599968A (en) * 2023-07-18 2023-08-15 中移(苏州)软件技术有限公司 Expansion and contraction method and device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116599968A (en) * 2023-07-18 2023-08-15 中移(苏州)软件技术有限公司 Expansion and contraction method and device, electronic equipment and readable storage medium
CN116599968B (en) * 2023-07-18 2023-11-03 中移(苏州)软件技术有限公司 Expansion and contraction method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN107209644B (en) Data processing method and NVMe memory
CN110162345B (en) Application program access method and device and storage medium
US9135322B2 (en) Environment classification
CN107105050B (en) Storage and downloading method and system for service objects
CN106657213A (en) File transmission method and device
CN109445902B (en) Data operation method and system
CN103558998A (en) Data processing method and device
CN111984729A (en) Heterogeneous database data synchronization method, device, medium and electronic equipment
CN111966287A (en) Data storage method, electronic device and storage medium
CN110990356B (en) Real-time automatic capacity expansion method and system for logical mirror image
CN114706526A (en) Automatic capacity expansion method, system and equipment for cloud native storage data volume
CN109271193B (en) Data processing method, device, equipment and storage medium
CN107844520A (en) Electronic installation, vehicle data introduction method and storage medium
CN111414339B (en) File processing method, system, device, equipment and medium
CN104965862A (en) Main memory database cluster synchronization method and main memory database host
CN107092494B (en) Method and device for accessing APK (android Package) resource
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN107479827A (en) A kind of mixing storage system implementation method based on IO and separated from meta-data
CN105144073A (en) Removable storage device identity and configuration information
CN110866380A (en) Method and terminal for filling in information field content
CN107422991B (en) Storage strategy management system
CN113791735A (en) Video data storage method and device, computer equipment and storage medium
CN104023056A (en) Method of updating data and associated equipment
CN110688201A (en) Log management method and related equipment
CN113076273B (en) Component access method, device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination