CN114138408B - Clone volume creation method, clone volume creation device, computer equipment and storage medium - Google Patents

Clone volume creation method, clone volume creation device, computer equipment and storage medium Download PDF

Info

Publication number
CN114138408B
CN114138408B CN202111341366.1A CN202111341366A CN114138408B CN 114138408 B CN114138408 B CN 114138408B CN 202111341366 A CN202111341366 A CN 202111341366A CN 114138408 B CN114138408 B CN 114138408B
Authority
CN
China
Prior art keywords
volume
clone
storage pool
clone volume
creation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111341366.1A
Other languages
Chinese (zh)
Other versions
CN114138408A (en
Inventor
郭长伟
张振广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111341366.1A priority Critical patent/CN114138408B/en
Publication of CN114138408A publication Critical patent/CN114138408A/en
Application granted granted Critical
Publication of CN114138408B publication Critical patent/CN114138408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Abstract

The application relates to a method, a device, computer equipment and a storage medium for creating a clone volume, which are characterized in that a creation instruction of the clone volume sent by a container arrangement scheduling engine K8s is received, the creation instruction is obtained for the K8s to obtain a configuration file of a container cluster, the configuration file is analyzed to obtain main volume information of a source volume of a first storage pool, a first clone volume of the source volume is created on the first storage pool according to the main volume information, a second clone volume of the first clone volume is created on a second storage pool according to the first clone volume, and a dual-activity relation between the first clone volume and the second clone volume is established, so that the clone volume of the dual-activity storage pool can be created simultaneously by the first clone volume and the second clone volume, and the reliability and the data safety of the dual-activity storage pool are improved.

Description

Clone volume creation method, clone volume creation device, computer equipment and storage medium
Technical Field
The present application relates to the field of data backup technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for creating a clone volume.
Background
With the gradual penetration of computer hardware virtualization technology, container technology is getting more and more popular among developers with the advantage of 'one-time construction and deployment everywhere'. The container scheduling engine (Kubernetes, K8 s) is used as a container cluster management system, and can realize functions of automatic deployment, automatic expansion and contraction, maintenance and the like of the container clusters. The dual-active storage pool is two storage pools which are mutually backed up and are in an operation state, a container storage interface (ContainerStorageInterface, CSI) plug-in unit is a container storage configuration interface defined by K8s, and the dual-active storage pool can provide a lasting storage space for a container cluster through the CSI plug-in unit.
At present, K8s can only manage one storage pool in the dual-active storage pool to create a clone volume through the CSI plug-in, but the other storage pool in the dual-active storage pool cannot create the clone volume, and the clone volumes in the dual-active storage pool cannot be created at the same time, so that the reliability of the dual-active storage pool and the security of data are reduced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, and storage medium for creating a clone volume, which can create a clone volume in a dual-active storage pool at the same time, thereby improving reliability of the dual-active storage pool and security of data.
In a first aspect, there is provided a method of clone volume creation, the method comprising:
Receiving a creation instruction of a clone volume sent by a container arrangement scheduling engine K8s, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for K8s and analyzing the configuration file;
According to the creation instruction, main volume information of a source volume of the first storage pool is obtained;
Creating a first clone volume of the source volume on the first storage pool according to the primary volume information;
Creating a second clone volume of the first clone volume on a second storage pool according to the first clone volume, wherein the first storage pool and the second storage pool are two storage pools of a dual-active storage pool;
and establishing a dual-activity relationship between the first clone volume and the second clone volume, so that the first clone volume and the second clone volume form the dual-activity clone volume.
In one possible implementation, creating a first clone volume of a source volume on a first storage pool based on primary volume information includes:
A volume creation command is invoked, based on the primary volume information, to create a first clone volume on the first storage pool with a pool name of the first storage pool as a parameter.
In one possible implementation, creating a second clone volume of the first clone volume on a second storage pool from the first clone volume, comprises:
According to the first clone volume, a volume creation command is invoked that creates a second clone volume on the second storage pool with the pool name of the second storage pool as a parameter.
In one possible implementation, establishing a dual activity relationship of a first clone volume with a second clone volume includes:
and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
In one possible implementation, the primary volume information includes: the size and type of the source volume; creating a first clone volume of a source volume on a first storage pool based on primary volume information, comprising:
A first clone volume is created on the first storage pool that is the same size and type as the source volume according to the size and type of the source volume.
In one possible implementation, creating a second clone volume of the first clone volume on a second storage pool from the first clone volume, comprises:
a second clone volume is created on the second storage pool that is the same size and type as the first clone volume according to the size and type of the first clone volume.
In a second aspect, there is provided an apparatus for clone volume creation, the apparatus comprising:
The receiving module is used for receiving a creation instruction of the clone volume sent by the container arrangement scheduling engine K8s, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for the K8s and analyzing the configuration file;
The acquisition module is used for acquiring main volume information of a source volume of the first storage pool according to the creation instruction;
the creation module is used for creating a first clone volume of the source volume on the first storage pool according to the main volume information;
the creation module is further configured to create a second clone volume of the first clone volume on a second storage pool according to the first clone volume, where the first storage pool and the second storage pool are two storage pools of a dual-active storage pool;
the establishing module is used for establishing the dual-activity relation between the first clone volume and the second clone volume so that the first clone volume and the second clone volume form the dual-activity clone volume.
In one possible implementation, a module is created, specifically for:
And according to the main volume information, calling a volume creation command taking the pool name of the first storage pool as a parameter to copy the data of the source volume on the first storage pool to obtain a first clone volume.
In a third aspect, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of clone volume creation in the first aspect or any implementation of the first aspect when the computer program is executed.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the method of clone volume creation in the first aspect or any implementation of the first aspect.
According to the method, the device, the computer equipment and the storage medium for creating the clone volumes, the creation instructions of the clone volumes sent by the container arrangement scheduling engine K8s are received, the creation instructions are used for obtaining configuration files of container clusters for the K8s and analyzing the configuration files to obtain main volume information of source volumes of a first storage pool, the first clone volumes of the source volumes are created on the first storage pool according to the main volume information, the second clone volumes of the first clone volumes are created on the second storage pool according to the first clone volumes, and the dual-activity relationship between the first clone volumes and the second clone volumes is established, so that the clone volumes of the dual-activity storage pool can be created simultaneously, and the reliability and the data safety of the dual-activity storage pool are improved.
Drawings
FIG. 1 is a flow diagram of a method of clone volume creation in one embodiment of the application;
FIG. 2 is a block diagram showing the construction of a clone volume creation apparatus according to one embodiment of the present application;
Fig. 3 is an internal structural view of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The double-active storage characteristic means that two storage data centers which are mutually backed up are in an operation state, when one data center fails, the service is automatically switched to the other data center, the problem that the conventional disaster recovery service cannot be automatically switched is solved, and high-level data reliability and service continuity can be provided for users.
A clone volume is a copy of an existing volume, i.e., the data on the source volume is copied to the target volume (clone). Cloning is similar to snapshot in that it is also a copy of one point in time of a volume, with the difference that: a snapshot is the creation of a new snapshot object from a volume, while a clone volume is the creation of a new independent volume, pre-populated with the data of the source volume. When the source volume needs to be rolled back to a certain time point, compared with the snapshot, the source volume needs to be rolled back to the target time point state, the clone volume can be directly used, and the use of the current source volume is not affected. In the scenario where reliability and performance are both required to be high, clone volumes are increasingly used.
Because the dual active storage pool has two storage pools which are simultaneously active, the process of creating the dual active clone volume is complicated, and the current CSI plug-in cannot create the dual active clone volume.
In order to solve the problems in the prior art, the embodiment of the application provides a method, a device, computer equipment and a storage medium for creating a clone volume. The method for creating the clone volume provided by the embodiment of the application is first described below.
FIG. 1 is a flow chart of a method for clone volume creation according to one embodiment of the present application. As shown in fig. 1, the method may include the steps of:
S110, receiving a creation instruction of the clone volume sent by the container arrangement scheduling engine K8S, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for the K8S and analyzing the configuration file.
And K8s acquires configuration files of the container cluster in real time, wherein the configuration files comprise information such as pool names of storage pools, volume names of storage volumes, types of the storage volumes and the like. And generating an instruction for creating the clone volume by analyzing the configuration file and sending the instruction to the CSI plug-in, wherein the CSI plug-in receives the instruction for creating the clone volume sent by the K8s and is used for calling a storage volume clone interface in the K8s by the CSI plug-in to execute the storage volume clone operation according to the instruction for creating.
S120, acquiring main volume information of a source volume of the first storage pool according to the creation instruction.
The source volume is a storage volume to be backed up or expanded in the storage pool, and the source volume can be an existing storage volume or a newly created storage volume, so that synchronous updating of the source volume and the clone volume from an initial state is ensured.
The creation instruction comprises a pool name of a storage pool and a volume name of a source volume set by a user, and the CSI plug-in can directly determine the storage pool needing cloning operation and the storage volume to be cloned on the storage pool through the creation instruction.
The first storage pool is one of the dual active storage pools, and the other storage pool is the second storage pool, and the first storage pool and the second storage pool do not define the order of storage volume cloning.
And the CSI plug-in determines the first storage pool and the source volume according to the creation instruction, and acquires the main volume information of the source volume as the basic data of the clone volume.
S130, creating a first clone volume of the source volume on the first storage pool according to the main volume information.
And calling a storage volume cloning interface in the K8s by the CSI plug-in, executing storage volume cloning operation on the first storage pool according to the main volume information, waiting for the cloning volume to finish data copying of the slave source volume, and obtaining a first cloning volume, wherein the first cloning volume is the cloning volume of the source volume.
And S140, creating a second clone volume of the first clone volume on a second storage pool according to the first clone volume, wherein the first storage pool and the second storage pool are two storage pools of a dual-active storage pool.
And calling a storage volume cloning interface in the K8s by the CSI plug-in, executing a storage volume cloning operation on a second storage pool according to the secondary volume information of the first cloning volume, waiting for the cloning volume to finish data copying from the first cloning volume, and obtaining a second cloning volume, wherein the second cloning volume is a cloning volume of the cloning volume.
S150, establishing a dual-activity relationship between the first clone volume and the second clone volume, so that the first clone volume and the second clone volume form a dual-activity clone volume.
The source volumes are subjected to double cloning to obtain two clone volumes, a double-activity relationship of the two clone volumes is established to obtain a double-activity clone volume, and the double-activity clone volume at a certain time point can be established for the double-activity volume, so that the reliability of storage is greatly improved.
In the embodiment of the application, the creation instruction of the clone volume sent by the container arrangement scheduling engine K8s is received, the creation instruction is K8s to obtain the configuration file of the container cluster, the configuration file is analyzed to obtain the main volume information of the source volume of the first storage pool, the first clone volume of the source volume is created on the first storage pool according to the main volume information, the second clone volume of the first clone volume is created on the second storage pool according to the first clone volume, and the dual-activity relation between the first clone volume and the second clone volume is established, so that the first clone volume and the second clone volume form the dual-activity clone volume, the clone volume of the dual-activity storage pool can be created at the same time, and the reliability and the data safety of the dual-activity storage pool are improved.
In some embodiments, creating a first clone volume of a source volume on a first storage pool based on primary volume information comprises:
A volume creation command is invoked, based on the primary volume information, to create a first clone volume on the first storage pool with a pool name of the first storage pool as a parameter.
The CSI plug-in calls a volume creation command parameterized by a pool name of the first storage pool, determines a storage pool in which to clone the storage volume, and creates a first clone volume on the storage pool that replicates the primary volume information.
In some embodiments, creating a second clone volume of the first clone volume on the second storage pool from the first clone volume comprises:
According to the first clone volume, a volume creation command is invoked that creates a second clone volume on the second storage pool with the pool name of the second storage pool as a parameter.
The CSI plug-in calls a volume creation command parameterized by a pool name of the second storage pool, determines a storage pool in which to clone the storage volume, and creates a second clone volume on the storage pool that replicates the primary volume information.
In some embodiments, establishing the dual activity relationship of the first clone volume with the second clone volume includes:
and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
The CSI plug-in calls a dual-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters to determine two clone volumes needing to establish the dual-activity relation, and establishes the dual-activity relation of the first clone volume and the second clone volume.
In some embodiments, the primary volume information includes: the size and type of the source volume; creating a first clone volume of a source volume on a first storage pool based on primary volume information, comprising:
A first clone volume is created on the first storage pool that is the same size and type as the source volume according to the size and type of the source volume.
The size of the source volume represents the capacity of the source volume, the types of the source volume comprise a common volume, a simplified volume and the like, and the first clone volume is required to be the same as the size and the type of the source volume so as to realize the complete replication of the source volume and ensure the accuracy of data backup.
In some embodiments, creating a second clone volume of the first clone volume on the second storage pool from the first clone volume comprises:
a second clone volume is created on the second storage pool that is the same size and type as the first clone volume according to the size and type of the first clone volume.
The first clone volume and the source volume are ensured to be the same in size and the same in type as the second clone volume, so that the two clone volumes with double-activity relationship contain the same data, the reliability of storage is greatly improved, and the safety of the data is ensured.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
In some embodiments, as shown in fig. 2, there is provided a clone volume creation apparatus including: a receiving module 210, an obtaining module 220, a creating module 230, and an establishing module 240, wherein:
The receiving module 210 is configured to receive a creation instruction of a clone volume sent by the container arrangement scheduling engine K8s, where the creation instruction is obtained by obtaining a configuration file of a container cluster for K8s, and analyzing the configuration file;
an obtaining module 220, configured to obtain main volume information of a source volume of the first storage pool according to the creation instruction;
a creation module 230 for creating a first clone volume of the source volume on the first storage pool based on the primary volume information;
the creating module 230 is further configured to create a second clone volume of the first clone volume on a second storage pool according to the first clone volume, where the first storage pool and the second storage pool are two storage pools of a dual-active storage pool;
the establishing module 240 is configured to establish a dual-activity relationship between the first clone volume and the second clone volume, so that the first clone volume and the second clone volume form a dual-activity clone volume.
In the embodiment of the application, the clone volumes of the double-active storage pool can be simultaneously created, and the reliability of the double-active storage pool and the safety of data are improved.
In some embodiments, the creation module 230 is specifically configured to:
A volume creation command is invoked, based on the primary volume information, to create a first clone volume on the first storage pool with a pool name of the first storage pool as a parameter.
In some embodiments, the creation module 230 is specifically configured to:
According to the first clone volume, a volume creation command is invoked that creates a second clone volume on the second storage pool with the pool name of the second storage pool as a parameter.
In some embodiments, the establishing module 240 is specifically configured to:
and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
In some embodiments, the primary volume information includes: the size and type of the source volume; based on the primary volume information, the creation module 230 is specifically configured to:
A first clone volume is created on the first storage pool that is the same size and type as the source volume according to the size and type of the source volume.
In some embodiments, the creation module 230 is specifically configured to:
a second clone volume is created on the second storage pool that is the same size and type as the first clone volume according to the size and type of the first clone volume.
For specific limitations on the clone volume creation apparatus, reference may be made to the limitations of the method of clone volume creation hereinabove, and no further description is given here. The respective modules in the clone volume creation apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In some embodiments, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data for source volumes and clone volumes. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of clone volume creation.
It will be appreciated by those skilled in the art that the structure shown in FIG. 3 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In some embodiments, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
Receiving a creation instruction of a clone volume sent by a container arrangement scheduling engine K8s, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for K8s and analyzing the configuration file;
According to the creation instruction, main volume information of a source volume of the first storage pool is obtained;
Creating a first clone volume of the source volume on the first storage pool according to the primary volume information;
Creating a second clone volume of the first clone volume on a second storage pool according to the first clone volume, wherein the first storage pool and the second storage pool are two storage pools of a dual-active storage pool;
and establishing a dual-activity relationship between the first clone volume and the second clone volume, so that the first clone volume and the second clone volume form the dual-activity clone volume.
In some embodiments, the processor when executing the computer program further performs the steps of: creating a first clone volume of a source volume on a first storage pool based on primary volume information, comprising: a volume creation command is invoked, based on the primary volume information, to create a first clone volume on the first storage pool with a pool name of the first storage pool as a parameter.
In some embodiments, the processor when executing the computer program further performs the steps of: creating a second clone volume of the first clone volume on a second storage pool from the first clone volume, comprising: according to the first clone volume, a volume creation command is invoked that creates a second clone volume on the second storage pool with the pool name of the second storage pool as a parameter.
In some embodiments, the processor when executing the computer program further performs the steps of: establishing a dual activity relationship of the first clone volume and the second clone volume, comprising: and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
In some embodiments, the processor when executing the computer program further performs the steps of: the primary volume information includes: the size and type of the source volume; creating a first clone volume of a source volume on a first storage pool based on primary volume information, comprising: a first clone volume is created on the first storage pool that is the same size and type as the source volume according to the size and type of the source volume.
In some embodiments, the processor when executing the computer program further performs the steps of: creating a second clone volume of the first clone volume on a second storage pool from the first clone volume, comprising:
a second clone volume is created on the second storage pool that is the same size and type as the first clone volume according to the size and type of the first clone volume.
In some embodiments, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Receiving a creation instruction of a clone volume sent by a container arrangement scheduling engine K8s, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for K8s and analyzing the configuration file;
According to the creation instruction, main volume information of a source volume of the first storage pool is obtained;
Creating a first clone volume of the source volume on the first storage pool according to the primary volume information;
Creating a second clone volume of the first clone volume on a second storage pool according to the first clone volume, wherein the first storage pool and the second storage pool are two storage pools of a dual-active storage pool;
and establishing a dual-activity relationship between the first clone volume and the second clone volume, so that the first clone volume and the second clone volume form the dual-activity clone volume.
In some embodiments, the computer program when executed by the processor further performs the steps of: creating a first clone volume of a source volume on a first storage pool based on primary volume information, comprising: a volume creation command is invoked, based on the primary volume information, to create a first clone volume on the first storage pool with a pool name of the first storage pool as a parameter.
In some embodiments, the computer program when executed by the processor further performs the steps of: creating a second clone volume of the first clone volume on a second storage pool from the first clone volume, comprising: according to the first clone volume, a volume creation command is invoked that creates a second clone volume on the second storage pool with the pool name of the second storage pool as a parameter.
In some embodiments, the computer program when executed by the processor further performs the steps of: establishing a dual activity relationship of the first clone volume and the second clone volume, comprising: and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
In some embodiments, the computer program when executed by the processor further performs the steps of: the primary volume information includes: the size and type of the source volume; creating a first clone volume of a source volume on a first storage pool based on primary volume information, comprising: a first clone volume is created on the first storage pool that is the same size and type as the source volume according to the size and type of the source volume.
In some embodiments, the computer program when executed by the processor further performs the steps of: creating a second clone volume of the first clone volume on a second storage pool from the first clone volume, comprising:
a second clone volume is created on the second storage pool that is the same size and type as the first clone volume according to the size and type of the first clone volume.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (8)

1. A method of clone volume creation for a dual active storage pool, the method comprising:
Receiving a creation instruction of a clone volume sent by a container arrangement scheduling engine K8s, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for the K8s and analyzing the configuration file;
according to the creation instruction, main volume information of a source volume of the first storage pool is obtained;
creating a first clone volume of the source volume on the first storage pool according to the primary volume information;
Creating a second clone volume of the first clone volume on a second storage pool according to the first clone volume, specifically comprising: the method comprises the steps of calling a volume creation command taking a pool name of the second storage pool as a parameter according to the first clone volume to create the second clone volume on the second storage pool, wherein the first storage pool and the second storage pool are two storage pools of a dual-activity storage pool;
Establishing a dual-activity relationship between the first clone volume and the second clone volume to enable the first clone volume and the second clone volume to form a dual-activity clone volume, wherein the method specifically comprises the following steps: and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
2. The method of claim 1, wherein creating a first clone volume of the source volume on the first storage pool based on the primary volume information comprises:
and according to the main volume information, calling a volume creation command taking the pool name of the first storage pool as a parameter to create the first clone volume on the first storage pool.
3. The method of claim 1, wherein the primary volume information comprises: the size and type of the source volume; creating a first clone volume of the source volume on the first storage pool according to the primary volume information, comprising:
a first clone volume is created on the first storage pool that is the same size and type as the source volume according to the size and type of the source volume.
4. The method of claim 3, wherein creating a second clone volume of the first clone volume on a second storage pool from the first clone volume comprises:
Creating a second clone volume on the second storage pool that is the same size and type as the first clone volume according to the size and type of the first clone volume.
5. An apparatus for clone volume creation of a dual active storage pool, the apparatus comprising:
The receiving module is used for receiving a creation instruction of a clone volume sent by a container arrangement scheduling engine K8s, wherein the creation instruction is obtained by obtaining a configuration file of a container cluster for the K8s and analyzing the configuration file;
The acquisition module is used for acquiring main volume information of a source volume of the first storage pool according to the creation instruction;
A creation module, configured to create a first clone volume of the source volume on the first storage pool according to the primary volume information;
The creation module is further configured to create, according to the first clone volume, a second clone volume of the first clone volume on a second storage pool, and specifically includes: the method comprises the steps of calling a volume creation command taking a pool name of the second storage pool as a parameter according to the first clone volume to create the second clone volume on the second storage pool, wherein the first storage pool and the second storage pool are two storage pools of a dual-activity storage pool;
the establishing module is configured to establish a dual-activity relationship between the first clone volume and the second clone volume, so that the first clone volume and the second clone volume form a dual-activity clone volume, and specifically includes: and calling a double-activity relation creation command taking the volume name of the first clone volume and the volume name of the second clone volume as parameters, and establishing the double-activity relation between the first clone volume and the second clone volume.
6. The apparatus of claim 5, wherein the creation module is specifically configured to:
And according to the main volume information, calling a volume creation command taking the pool name of the first storage pool as a parameter to copy the data of the source volume on the first storage pool, and obtaining a first clone volume.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 4 when the computer program is executed.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
CN202111341366.1A 2021-11-12 2021-11-12 Clone volume creation method, clone volume creation device, computer equipment and storage medium Active CN114138408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111341366.1A CN114138408B (en) 2021-11-12 2021-11-12 Clone volume creation method, clone volume creation device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111341366.1A CN114138408B (en) 2021-11-12 2021-11-12 Clone volume creation method, clone volume creation device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114138408A CN114138408A (en) 2022-03-04
CN114138408B true CN114138408B (en) 2024-05-03

Family

ID=80393048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111341366.1A Active CN114138408B (en) 2021-11-12 2021-11-12 Clone volume creation method, clone volume creation device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114138408B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115576655B (en) * 2022-12-09 2023-04-14 浪潮电子信息产业股份有限公司 Container data protection system, method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329701A (en) * 2017-06-29 2017-11-07 郑州云海信息技术有限公司 Creation method, the apparatus and system of dual-active volume in a kind of storage system
CN109460319A (en) * 2018-11-01 2019-03-12 郑州云海信息技术有限公司 A kind of creation method, device, system, equipment and the storage medium of writeable snapshot
CN110286856A (en) * 2019-06-17 2019-09-27 杭州宏杉科技股份有限公司 Roll up cloning process, device, electronic equipment and machine readable storage medium
CN113626144A (en) * 2021-07-18 2021-11-09 苏州浪潮智能科技有限公司 Method, device and equipment for creating and storing double live volumes by cluster and readable medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11086725B2 (en) * 2019-03-25 2021-08-10 Robin Systems, Inc. Orchestration of heterogeneous multi-role applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329701A (en) * 2017-06-29 2017-11-07 郑州云海信息技术有限公司 Creation method, the apparatus and system of dual-active volume in a kind of storage system
CN109460319A (en) * 2018-11-01 2019-03-12 郑州云海信息技术有限公司 A kind of creation method, device, system, equipment and the storage medium of writeable snapshot
CN110286856A (en) * 2019-06-17 2019-09-27 杭州宏杉科技股份有限公司 Roll up cloning process, device, electronic equipment and machine readable storage medium
CN113626144A (en) * 2021-07-18 2021-11-09 苏州浪潮智能科技有限公司 Method, device and equipment for creating and storing double live volumes by cluster and readable medium

Also Published As

Publication number Publication date
CN114138408A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN108322533B (en) Configuration and synchronization method between distributed type assemblies node based on operation log
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
CN109460252B (en) Configuration file processing method and device based on git and computer equipment
CN110602165B (en) Government affair data synchronization method, device, system, computer equipment and storage medium
CN110727724B (en) Data extraction method and device, computer equipment and storage medium
CN110689232A (en) Workflow configuration optimization processing method and device and computer equipment
CN108920301B (en) Data backup method and system, and data recovery method and system
CN111078451B (en) Distributed transaction processing method and device, computer equipment and storage medium
CN111309524A (en) Distributed storage system fault recovery method, device, terminal and storage medium
CN114138408B (en) Clone volume creation method, clone volume creation device, computer equipment and storage medium
CN112596951A (en) NAS data disaster tolerance method, device, equipment and storage medium
US8612799B2 (en) Method and apparatus of backing up subversion repository
CN110109712A (en) Service Component loading method, device, computer equipment and storage medium
CN110727698A (en) Database access method and device, computer equipment and storage medium
CN111158959A (en) Virtual machine backup method and device and virtual machine recovery method and device
CN114138549A (en) Data backup and recovery method based on kubernets system
CN115221156A (en) Database cluster capacity expansion method and device, computer equipment and storage medium
CN111966530A (en) Disaster recovery switching method and device for application system, computer equipment and storage medium
CN111291063A (en) Master and backup copy election method, system, computer equipment and storage medium
CN115658390A (en) Container disaster tolerance method, system, device, equipment and computer readable storage medium
CN113311995B (en) Cloud hard disk preparation method and device, computer equipment and storage medium
CN113312309A (en) Management method and device of snapshot chain and storage medium
CN110162507B (en) Snapshot overwriting method, device, computer equipment and storage medium
CN113268348B (en) Switching method and device of distributed lock server, computer equipment and medium
CN113609211B (en) Cluster information synchronization method and device, computer equipment and storage medium

Legal Events

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