WO2023050665A1 - 一种存储卷跨节点克隆的方法、装置、设备及可读介质 - Google Patents
一种存储卷跨节点克隆的方法、装置、设备及可读介质 Download PDFInfo
- Publication number
- WO2023050665A1 WO2023050665A1 PCT/CN2022/074365 CN2022074365W WO2023050665A1 WO 2023050665 A1 WO2023050665 A1 WO 2023050665A1 CN 2022074365 W CN2022074365 W CN 2022074365W WO 2023050665 A1 WO2023050665 A1 WO 2023050665A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- aep
- storage
- clone
- snapshot
- nodes
- Prior art date
Links
- 238000010367 cloning Methods 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000004044 response Effects 0.000 claims abstract description 70
- 238000012544 monitoring process Methods 0.000 claims abstract description 29
- 238000004590 computer program Methods 0.000 claims description 15
- 230000005540 biological transmission Effects 0.000 claims description 13
- 230000007246 mechanism Effects 0.000 claims description 13
- 230000009849 deactivation Effects 0.000 claims description 5
- 230000008014 freezing Effects 0.000 claims 1
- 238000007710 freezing Methods 0.000 claims 1
- 230000005012 migration Effects 0.000 abstract description 5
- 238000013508 migration Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 10
- 238000007726 management method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000005192 partition Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0647—Migration mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/84—Using snapshots, i.e. a logical point-in-time copy of the data
Definitions
- the present invention relates to the computer field, and more specifically relates to a method, device, device and readable medium for cross-node cloning of storage volumes.
- Kubernetes an open source, used to manage containerized applications on multiple hosts in the cloud platform.
- the goal of Kubernetes is to make deploying containerized applications simple and efficient.
- Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance
- Kubernetes has excellent performance in applications in various scenarios.
- the performance of the application is also a guarantee to provide services to the outside world. Among them, improving storage performance plays a vital role in improving application performance.
- AEP abbreviation for Apache Pass
- AEP is a new type of non-volatile Optane Memory device introduced by Intel.
- AEP has the advantages of lower price than DRAM (Dynamic Random Access Memory) and higher performance than SSD (Solid State Drive).
- pmem-csi a csi storage driver that provides local persistent memory as a file system volume to container applications
- AEP is a storage plugin that applies AEP to Kubernetes, which supports the creation and deletion of storage volumes, as well as storage Volume mounting and unmounting functions, but when using the storage volume created by pmem-csi, the storage volume cannot be backed up across nodes, because AEP is a kind of local storage, and the AEP storage volume cannot be cloned across nodes.
- the purpose of the embodiment of the present application is to propose a method, device, device, and readable medium for cross-node cloning of storage volumes.
- an aspect of the embodiments of the present application provides a method for cross-node cloning of a storage volume, including the following steps:
- it also includes:
- starting the clone volume includes:
- the cloned volume stores a received piece of data and sends a response message to the AEP storage;
- the next data piece of the snapshot data stored by the AEP is sent to the clone volume until all the data is successfully stored in the clone volume.
- it also includes:
- the cloning operation is stopped and a warning of the cloning failure is sent.
- stopping the cloning operation and sending a warning of cloning failure includes:
- the warning of cloning failure is sent to the administrator's mobile device and email via the network, and displayed on the display device where the AEP is stored.
- stopping AEP storage and clone volumes includes:
- freeze command In response to monitoring that there are AEP-stored clone volumes in other nodes in the cluster, use the freeze command: fsfreeze–freeze to freeze the AEP storage and clone volumes.
- restoring the AEP storage after creating a snapshot of the AEP storage includes:
- lvm Logical Volume Manager, logical volume management, which is a logical collection of one or more hard disk partitions, which is equivalent to a large hard disk.
- the lvm snapshot interface is lvcreate-L xxxGB-s-n lv_image_snap/dev/vg_image/lv_image, wherein -L xxxGB is the size of the snapshot to be created, -s is the creation of the snapshot, and -n lv_image_snap is the name of the snapshot to be created It is lv_image_snap, and /dev/vg_image/lv_image is the logical volume to be created.
- using pmem-csi to create AEP storage in the nodes of the cluster, and monitoring whether there are clone volumes of AEP storage in other nodes in the cluster include:
- Another aspect of the embodiments of the present application also provides an apparatus for cloning storage volumes across nodes, the apparatus comprising:
- Monitoring module the monitoring module is configured to use pmem-csi to create AEP storage in the nodes of the cluster, and monitor whether there are clone volumes of AEP storage in other nodes in the cluster;
- the deactivation module is configured to stop AEP storage and clone volumes in response to monitoring that there are clone volumes with AEP storage in other nodes in the cluster;
- the transmission module is configured to start the clone volume after the snapshot data stored in the AEP is transmitted to the clone volume.
- a division module is also included, and the division module is configured as:
- the transmission module is further configured to:
- the cloned volume stores a received piece of data and sends a response message to the AEP storage;
- the next data piece of the snapshot data stored by the AEP is sent to the clone volume until all the data is successfully stored in the clone volume.
- a warning module is also included, and the warning module is configured to:
- the cloning operation is stopped and a warning of the cloning failure is sent.
- the warning module is further configured to:
- the warning of cloning failure is sent to the administrator's mobile device and email via the network, and displayed on the display device where the AEP is stored.
- the creation module is further configured to:
- the monitoring module is also configured to:
- the Kubernetes-based listwatch mechanism monitors whether there are cloned volumes stored by AEP in other nodes in the cluster.
- a computer device in another aspect of the embodiments of the present application, includes:
- Memory stores computer instructions that can be run on the processor, and when the instructions are executed by the processor, the steps of any one of the above-mentioned methods are realized.
- Another aspect of the embodiments of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.
- the method for cross-node cloning of storage volumes uses pmem-csi to create AEP storage in the nodes of the cluster, and monitors whether there are cloned volumes of AEP storage in other nodes in the cluster ; In response to monitoring that there are cloned volumes of AEP storage in other nodes in the cluster, stop AEP storage and clone volumes; restore AEP storage after creating a snapshot of AEP storage; after transferring the snapshot data of AEP storage to the clone volume, start the clone volume
- the technical solution can solve the problems of application migration and data backup using AEP storage volumes in the cloud platform.
- FIG. 1 is a schematic flowchart of a method for cloning storage volumes across nodes according to an embodiment of the present application
- FIG. 2 is a schematic diagram of an apparatus for cloning storage volumes across nodes according to an embodiment of the present application
- FIG. 3 is a schematic diagram of a computer device according to an embodiment of the present application.
- FIG. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the present application.
- Figure 1 shows a schematic flowchart of the method.
- the method may include the following steps:
- S1 uses pmem-csi to create AEP storage in the nodes of the cluster, and monitors whether there are clone volumes of AEP storage in other nodes in the cluster.
- the listwatch mechanism based on Kubernetes can monitor the storage volume cloning event and coordinate the data transmission work on each node, so that the cross-node cloning work of the storage volume can be completed in an orderly manner.
- the storage in other nodes is a clone of AEP storage
- S2 stops AEP storage and clone volumes in response to monitoring that there are clone volumes stored by AEP in other nodes in the cluster.
- S3 restores the AEP storage after creating a snapshot of the AEP storage.
- the snapshot data stored in AEP can be transferred to the clone volume by data fragmentation.
- the snapshot data stored in AEP is divided into several data slices according to the threshold size, and one data slice of the snapshot data stored in AEP is sent to the clone volume.
- the clone volume will store a data piece received, and send a response message back to the AEP storage after the storage is successful, informing the AEP storage that it can continue to send the data piece.
- the AEP storage receives the storage success response message sent by the clone volume, Then send the next data slice of the snapshot data stored in AEP to the clone volume, and the clone volume will store the second data slice received, and then send a response message to the AEP storage after the storage is successful, and repeat the above process until All data is successfully stored in the cloned volume.
- the cloning volume will combine the received data slices into complete data in order, and the cross-node cloning operation of AEP storage is completed at this time.
- AEP storage will resend the last transmitted data piece, and the clone volume will check the received data piece for duplicate processing. The same data piece will be received for deduplication operation. If the same problem occurs twice in the transmission of the same data piece, it is necessary to issue a warning to the administrator of cloning failure and stop the cloning operation.
- the warning of cloning failure can be sent to the administrator’s mobile device and email via the network, and the AEP It is displayed on the display device where the storage is located, and the administrator is notified in time for processing.
- AEP storage created using pmem-csi cannot back up storage volumes across nodes, because AEP is a kind of local storage, and AEP storage volumes cannot be cloned across nodes.
- the method of this application makes full use of the capacity management interface of LVM to extend pmem -csi function, increase the cross-node clone function of pmem-csi.
- the storage volume on Kubernetes is monitored through the listwatch method of Kubernetes. When a storage volume that needs to be cloned is detected, the cloning operation can be performed across nodes.
- starting the clone volume includes:
- the cloned volume stores a received piece of data and sends a response message to the AEP storage;
- the next data piece of the snapshot data stored by the AEP is sent to the clone volume until all the data is successfully stored in the clone volume.
- the clone volume receives a data piece and stores it successfully, it will send a storage success response message to the AEP storage.
- the AEP storage After receiving the storage success response message, the AEP storage will send the next data piece until all the data pieces are sent.
- the AEP storage will send a data transfer completion message to the clone volume, and the clone volume will store the received data slices in the order of transmission, and after receiving the transmission completion message sent by the AEP storage According to the stored data, the data slices will be merged into complete data and stored in the clone volume.
- the cloning operation is stopped and a warning of the cloning failure is sent. If there is a problem during the transmission of a certain data piece, or the time to send a response message exceeds the time threshold, AEP storage will resend the last transmitted data piece, and the clone volume will check the received data piece for duplicate processing. The same data piece will be received for deduplication operation. If the same problem occurs twice in the transmission of the same data piece, it is necessary to issue a warning to the administrator of cloning failure and stop the cloning operation. The warning of cloning failure can be sent to the administrator’s mobile device and email via the network, and the AEP It is displayed on the display device where the storage is located, and the administrator is notified in time for processing.
- stopping the cloning operation and sending a warning of the cloning failure includes:
- the warning of cloning failure is sent to the administrator's mobile device and email via the network, and displayed on the display device where the AEP is stored.
- stopping AEP storage and clone volumes includes:
- fsfreeze In response to monitoring that there are AEP-stored clone volumes in other nodes in the cluster, use the freeze command: fsfreeze–freeze to freeze the AEP storage and clone volumes. You can use the command fsfreeze–unfreeze to unfreeze when restoring AEP storage and clone volumes.
- restoring the AEP storage after creating a snapshot of the AEP storage includes:
- the lvm snapshot interface is lvcreate-L xxxGB-s-n lv_image_snap/dev/vg_image/lv_image, wherein -L xxxGB is the size of the snapshot to be created, -s is to create a snapshot, and -n lv_image_snap is to be The name of the created snapshot is lv_image_snap, and /dev/vg_image/lv_image is the logical volume to be created.
- using pmem-csi to create AEP storage in the nodes of the cluster, and monitoring whether there are clone volumes of AEP storage in other nodes in the cluster include:
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM).
- ROM Read-Only Memory
- RAM Random Access Memory
- the method disclosed according to the embodiment of the present application may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium.
- the computer program is executed by the CPU, the above functions defined in the methods disclosed in the embodiments of the present application are executed.
- the device 200 includes:
- Monitoring module 201 the monitoring module 201 is configured to use pmem-csi to create AEP storage in the nodes of the cluster, and monitor whether there is a clone volume of AEP storage in other nodes in the cluster;
- the deactivation module 202 is configured to stop AEP storage and clone volumes in response to monitoring that there are clone volumes stored by AEP in other nodes in the cluster;
- create a module 203 and the create module 203 is configured to restore the AEP storage after creating a snapshot of the AEP storage;
- the transfer module 204 is configured to start the clone volume after the snapshot data stored in the AEP is transferred to the clone volume.
- a division module is also included, and the division module is configured as:
- the transmission module is also configured as:
- the cloned volume stores a received piece of data and sends a response message to the AEP storage;
- the next data piece of the snapshot data stored by the AEP is sent to the clone volume until all the data is successfully stored in the clone volume.
- a warning module is also included, and the warning module is configured as:
- the cloning operation is stopped and a warning of the cloning failure is sent.
- the warning module is further configured to:
- the warning of cloning failure is sent to the administrator's mobile device and email via the network, and displayed on the display device where the AEP is stored.
- the creation module 203 is also configured to:
- the monitoring module 201 is also configured to:
- the Kubernetes-based listwatch mechanism monitors whether there are cloned volumes stored by AEP in other nodes in the cluster.
- FIG. 3 is a schematic diagram of an embodiment of a computer device provided by the present application.
- the embodiment of the present application includes the following devices: at least one processor S21; and a memory S22, the memory S22 stores computer instructions S23 that can run on the processor, and the instructions are executed by the processor to implement the following methods:
- starting the clone volume includes:
- the cloned volume stores a received piece of data and sends a response message to the AEP storage;
- the next data piece of the snapshot data stored by the AEP is sent to the clone volume until all the data is successfully stored in the clone volume.
- the cloning operation is stopped and a warning of the cloning failure is sent.
- stopping the cloning operation and sending a warning of the cloning failure includes:
- the warning of cloning failure is sent to the administrator's mobile device and email via the network, and displayed on the display device where the AEP is stored.
- restoring the AEP storage after creating a snapshot of the AEP storage includes:
- using pmem-csi to create AEP storage in the nodes of the cluster, and monitoring whether there are clone volumes of AEP storage in other nodes in the cluster include:
- the Kubernetes-based listwatch mechanism monitors whether there are cloned volumes stored by AEP in other nodes in the cluster.
- FIG. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present application.
- the computer-readable storage medium S31 stores a computer program S32 that executes the following method when executed by the processor:
- starting the clone volume includes:
- the cloned volume stores a received piece of data and sends a response message to the AEP storage;
- the next data piece of the snapshot data stored by the AEP is sent to the clone volume until all the data is successfully stored in the clone volume.
- the cloning operation is stopped and a warning of the cloning failure is sent.
- stopping the cloning operation and sending a warning of the cloning failure includes:
- the warning of cloning failure is sent to the administrator's mobile device and email via the network, and displayed on the display device where the AEP is stored.
- restoring the AEP storage after creating a snapshot of the AEP storage includes:
- using pmem-csi to create AEP storage in the nodes of the cluster, and monitoring whether there are clone volumes of AEP storage in other nodes in the cluster include:
- the Kubernetes-based listwatch mechanism monitors whether there are cloned volumes stored by AEP in other nodes in the cluster.
- the method disclosed according to the embodiment of the present application may also be implemented as a computer program executed by a processor, and the computer program may be stored in a computer-readable storage medium.
- the computer program is executed by the processor, the above functions defined in the methods disclosed in the embodiments of the present application are executed.
- the above-mentioned method steps and system units can also be realized by using a controller and a computer-readable storage medium for storing a computer program for enabling the controller to realize the functions of the above-mentioned steps or units.
- functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer.
- the computer readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage device, magnetic disk storage device or other magnetic storage device, or may be used to carry or store instructions in Any other medium that can be accessed by a general purpose or special purpose computer or a general purpose or special purpose processor, and the required program code or data structure. Also, any connection is properly termed a computer-readable medium.
- Disk and disc includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers . Combinations of the above should also be included within the scope of computer-readable media.
- the storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提供了一种存储卷跨节点克隆的方法、装置、设备及可读介质,方法包括:在集群的节点中使用pmem‑csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷(S1);响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷(S2);创建AEP存储的快照后恢复AEP存储(S3);将AEP存储的快照数据传输到克隆卷后,启动克隆卷(S4)。通过使用本申请的方案,能够解决云平台中使用AEP存储卷的应用迁移与数据备份的问题。
Description
本申请要求在2021年9月28日提交中国专利局、申请号为202111141286.1、发明名称为“一种存储卷跨节点克隆的方法、装置、设备及可读介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及计算机领域,并且更具体地涉及一种存储卷跨节点克隆的方法、装置、设备及可读介质。
在云计算时代,越来越多的公司和个人使用Kubernetes(是一个开源的,用于管理云平台中多个主机上的容器化的应用,Kubernetes的目标是让部署容器化的应用简单并且高效,Kubernetes提供了应用部署、规划、更新、维护的一种机制),Kubernetes在各种场景中的应用上都有出色的表现。应用的性能也是保证能够向外部提供服务的保证。其中提升存储的性能在提升应用性能的过程中起到了至关重要的作用。AEP(Apache Pass的缩写)是Intel推出的一种新型的非易失Optane Memory设备,AEP具有相对于DRAM(动态随机存储器)价格较低,相对于SSD(固态硬盘)性能更高的优点。pmem-csi(是一个csi存储驱动程序,它将本地持久内存作为文件系统卷提供给容器应用程序)是将AEP应用到Kubernetes中的一种存储插件,该插件支持创建与删除存储卷,以及存储卷的挂载与卸载功能,但是在使用pmem-csi创建的存储卷时,是无法对存储卷进行跨节点备份的,因为AEP是一种本地存储,无法将AEP存储卷跨节点克隆。
发明内容
有鉴于此,本申请实施例的目的在于提出一种存储卷跨节点克隆的方法、装置、设备及可读介质,通过使用本申请的技术方案,能够解决云平台中使用AEP存储卷的应用迁移与数据备份的问题。
基于上述目的,本申请的实施例的一个方面提供了一种存储卷跨节点克隆的方法,包括以下步骤:
在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷;
响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷;
创建AEP存储的快照后恢复AEP存储;
将AEP存储的快照数据传输到克隆卷后,启动克隆卷。
根据本申请的一个实施例,还包括:
将AEP存储的快照数据按照阈值大小划分成若干个数据片。
根据本申请的一个实施例,将AEP存储的快照数据传输到克隆卷后,启动克隆卷包括:
将AEP存储的快照数据的一个数据片发送到克隆卷中;
克隆卷将接收到的一个数据片进行存储,并向AEP存储发送响应消息;
响应于AEP存储接收到克隆卷发送的存储成功的响应消息,将AEP存储的快照数据的下一个数据片发送到克隆卷中,直到所有的数据全部在克隆卷中成功存储。
根据本申请的一个实施例,还包括:
响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告。
根据本申请的一个实施例,响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告包括:
将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示。
根据本申请的一个实施例,响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷包括:
响应于监控到集群中其他节点中有AEP存储的克隆卷,使用冻结命令:fsfreeze–freeze将AEP存储和克隆卷进行冻结。
根据本申请的一个实施例,创建AEP存储的快照后恢复AEP存储包括:
通过AEP存储的名字找到映射的主机目录;
在主机目录中通过liswatch机制获取到AEP存储的信息,信息包括AEP存储的容量;
设置待创建的快照的名称,并将名称、容量和目录参数传入lvm(Logical Volume Manager,逻辑卷管理,是将一个或多个硬盘的分区在逻辑上集合,相当于一个大硬盘来使用,当硬盘的空间不够使用的时候,可以继续将其它的硬盘的分区加入其中,这样可以实现磁盘空间的动态管理,相对于普通的磁盘分区有很大的灵活性)快照接口中以创建AEP存储的快照;
响应于AEP存储的快照创建完成,恢复AEP存储。
根据本申请的一个实施例,lvm快照接口为lvcreate-L xxxGB-s-n lv_image_snap/dev/vg_image/lv_image,其中-L xxxGB为待创建快照大小,-s为创建快照,-n lv_image_snap为待创建快照名为lv_image_snap,/dev/vg_image/lv_image为待创建快照的逻辑卷。
根据本申请的一个实施例,在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷包括:
基于Kubernetes的listwatch机制(Kubernetes中实现集群控制模块最核心的设计之一,它采用统一的异步消息处理机制,保证了消息的实时性、可靠性、顺序性和性能等)监控集群中其他节点中的存储卷的信息;
判断监控到的信息中是否带有AEP存储的节点信息标签;
响应于监控到的信息中带有AEP存储的节点信息标签,确定为其他节点中的存储卷为AEP存储的克隆卷。
本申请的实施例的另一个方面,还提供了一种存储卷跨节点克隆的装置,装置包括:
监控模块,监控模块配置为在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷;
停用模块,停用模块配置为响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷;
创建模块,创建模块配置为创建AEP存储的快照后恢复AEP存储;
传输模块,传输模块配置为将AEP存储的快照数据传输到克隆卷后,启动克隆卷。
根据本申请的一个实施例,还包括划分模块,划分模块配置为:
将AEP存储的快照数据按照阈值大小划分成若干个数据片。
根据本申请的一个实施例,传输模块还配置为:
将AEP存储的快照数据的一个数据片发送到克隆卷中;
克隆卷将接收到的一个数据片进行存储,并向AEP存储发送响应消息;
响应于AEP存储接收到克隆卷发送的存储成功的响应消息,将AEP存储的快照数据的下一个数据片发送到克隆卷中,直到所有的数据全部在克隆卷中成功存储。
根据本申请的一个实施例,还包括警告模块,警告模块配置为:
响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告。
根据本申请的一个实施例,警告模块还配置为:
将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示。
根据本申请的一个实施例,创建模块还配置为:
利用LVM快照管理接口创建AEP存储的快照。
根据本申请的一个实施例,监控模块还配置为:
基于Kubernetes的listwatch机制监控集群中其他节点中是否有AEP存储的克隆卷。
本申请的实施例的另一个方面,还提供了一种计算机设备,该计算机设备包括:
至少一个处理器;以及
存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行时实现上述任意一项方法的步骤。
本申请的实施例的另一个方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现上述任意一项方法的步骤。
本申请具有以下有益技术效果:本申请实施例提供的存储卷跨节点克隆的方法,通过在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷;响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷;创建AEP存储的快照后恢复AEP存储;将AEP存储的快照数据传输到克隆卷后,启动克隆卷的技术方案,能够解决云平台中使用AEP存储卷的应用迁移与数据备份的问题。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为根据本申请一个实施例的存储卷跨节点克隆的方法的示意性流程图;
图2为根据本申请一个实施例的存储卷跨节点克隆的装置的示意图;
图3为根据本申请一个实施例的计算机设备的示意图;
图4为根据本申请一个实施例的计算机可读存储介质的示意图。
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请实施例进一步详细说明。
基于上述目的,本申请的实施例的第一个方面,提出了一种存储卷跨节点克隆的方法的一个实施例。图1示出的是该方法的示意性流程图。
如图1中所示,该方法可以包括以下步骤:
S1在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷。
基于Kubernetes的listwatch机制可以实现监听存储卷克隆事件,以及协调每个节点上的数据传输工作,能够使存储卷的跨节点克隆工作有条不紊的完成,当监听到其他节点中的存储是AEP存储的克隆卷时,需要使用如下方法完成AEP存储的跨节点克隆。
S2响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷。
当监控到其他节点中有AEP存储的克隆卷时,需要将AEP存储和克隆卷全部进行停用,防止在AEP存储中的数据在跨节点克隆时还有新的数据写入。
S3创建AEP存储的快照后恢复AEP存储。
利用LVM快照管理接口创建AEP存储的快照,快照创建完成后可以 恢复AEP存储的使用,只需要将快照中的数据转移到克隆卷中就可以完成AEP存储的跨节点克隆。
S4将AEP存储的快照数据传输到克隆卷后,启动克隆卷。
AEP存储的快照数据可以通过将数据分片的方式传输到克隆卷中,首先将AEP存储的快照数据按照阈值大小划分成若干个数据片,将AEP存储的快照数据的一个数据片发送到克隆卷中,克隆卷将接收到的一个数据片进行存储,存储成功后回向AEP存储发送一个响应消息,通知AEP存储可以继续发送数据片,如果AEP存储接收到克隆卷发送的存储成功的响应消息,则将AEP存储的快照数据的下一个数据片发送到克隆卷中,克隆卷将接收到的第二个数据片进行存储,存储成功后回再向AEP存储发送一个响应消息,重复上面的过程直到所有的数据全部在克隆卷中成功存储。克隆卷会将接收到的数据片按照顺序组合成完整的数据,此时完成了AEP存储的跨节点的克隆操作。如果在某一个数据片传输过程中出现了问题,或者发送响应消息的时间超过了时间阈值,AEP存储会重新发送最后一个传输的数据片,克隆卷会对接收到的数据片进行查重处理,将接收到相同的数据片进行重删操作。如果相同数据片的传输出现了两次相同的问题,则需要向管理员发出克隆失败的警告并停止克隆操作,可以将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示,及时通知管理员进行处理。
使用pmem-csi创建的AEP存储是无法对存储卷进行跨节点备份的,因为AEP是一种本地存储,无法将AEP存储卷跨节点克隆,本申请的方法充分利用LVM的容量管理接口,扩展pmem-csi功能,增加pmem-csi的跨节点克隆功能。通过Kubernetes的listwatch方式监控Kubernetes上的存储卷,当监听到有需要克隆的存储卷时,则可以跨节点执行克隆操作。
通过本申请的技术方案,能够解决云平台中使用AEP存储卷的应用迁移与数据备份的问题。
在本申请的一个可选实施例中,还包括:
将AEP存储的快照数据按照阈值大小划分成若干个数据片。将完整的数据分片传输可以减少相同时间内网络的传输压力,还能够减少数据传输出错的概率,更有利于将数据完整快速的进行克隆。
在本申请的一个可选实施例中,将AEP存储的快照数据传输到克隆卷后,启动克隆卷包括:
将AEP存储的快照数据的一个数据片发送到克隆卷中;
克隆卷将接收到的一个数据片进行存储,并向AEP存储发送响应消息;
响应于AEP存储接收到克隆卷发送的存储成功的响应消息,将AEP存储的快照数据的下一个数据片发送到克隆卷中,直到所有的数据全部在克隆卷中成功存储。克隆卷每接收一个数据片并成功存储后会向AEP存储发送存储成功的响应消息,AEP存储接收到存储成功的响应消息会将下一个数据片发送,直到所有的数据片都发送完成,当AEP存储中的数据片全部发送完成后,AEP存储会向克隆卷发送数据传输完成的消息,克隆卷对接收到的数据片按照传输的顺序进行存储,在接收到AEP存储发送的传输完成的消息后会按照存储的数据将数据片合并成完整的数据保存在克隆卷中。
在本申请的一个可选实施例中,还包括:
响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告。如果在某一个数据片传输过程中出现了问题,或者发送响应消息的时间超过了时间阈值,AEP存储会重新发送最后一个传输的数据片,克隆卷会对接收到的数据片进行查重处理,将接收到相同的数据片进行重删操作。如果相同数据片的传输出现了两次相同的问题,则需要向管理员发出克隆失败的警告并停止克隆操作,可以将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示,及时通知管理员进行处理。
在本申请的一个可选实施例中,响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告包括:
将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示。
在本申请的一个可选实施例中,响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷包括:
响应于监控到集群中其他节点中有AEP存储的克隆卷,使用冻结命令:fsfreeze–freeze将AEP存储和克隆卷进行冻结。在恢复AEP存储和克隆卷时可以使用命令fsfreeze–unfreeze进行解冻。
在本申请的一个可选实施例中,创建AEP存储的快照后恢复AEP存储包括:
通过AEP存储的名字找到映射的主机目录;
在主机目录中通过liswatch机制获取到AEP存储的信息,信息包括AEP 存储的容量;
设置待创建的快照的名称,并将名称、容量和目录参数传入lvm快照接口中以创建AEP存储的快照;
响应于AEP存储的快照创建完成,恢复AEP存储。
在本申请的一个可选实施例中,lvm快照接口为lvcreate-L xxxGB-s-n lv_image_snap/dev/vg_image/lv_image,其中-L xxxGB为待创建快照大小,-s为创建快照,-n lv_image_snap为待创建快照名为lv_image_snap,/dev/vg_image/lv_image为待创建快照的逻辑卷。
在本申请的一个可选实施例中,在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷包括:
基于Kubernetes的listwatch机制监控集群中其他节点中的存储卷的信息;
判断监控到的信息中是否带有AEP存储的节点信息标签;
响应于监控到的信息中带有AEP存储的节点信息标签,确定为其他节点中的存储卷为AEP存储的克隆卷。
通过本申请的技术方案,能够解决云平台中使用AEP存储卷的应用迁移与数据备份的问题。
需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,上述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中存储介质可为磁碟、光盘、只读存储器(Read-Only Memory,ROM)或随机存取存储器(Random Access Memory,RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
此外,根据本申请实施例公开的方法还可以被实现为由CPU执行的计算机程序,该计算机程序可以存储在计算机可读存储介质中。在该计算机程序被CPU执行时,执行本申请实施例公开的方法中限定的上述功能。
基于上述目的,本申请的实施例的第二个方面,提出了一种存储卷跨节点克隆的装置,如图2所示,装置200包括:
监控模块201,监控模块201配置为在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷;
停用模块202,停用模块202配置为响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷;
创建模块203,创建模块203配置为创建AEP存储的快照后恢复AEP存储;
传输模块204,传输模块204配置为将AEP存储的快照数据传输到克隆卷后,启动克隆卷。
在本申请的一个可选实施例中,还包括划分模块,划分模块配置为:
将AEP存储的快照数据按照阈值大小划分成若干个数据片。
在本申请的一个可选实施例中,传输模块还配置为:
将AEP存储的快照数据的一个数据片发送到克隆卷中;
克隆卷将接收到的一个数据片进行存储,并向AEP存储发送响应消息;
响应于AEP存储接收到克隆卷发送的存储成功的响应消息,将AEP存储的快照数据的下一个数据片发送到克隆卷中,直到所有的数据全部在克隆卷中成功存储。
在本申请的一个可选实施例中,还包括警告模块,警告模块配置为:
响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告。
在本申请的一个可选实施例中,警告模块还配置为:
将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示。
在本申请的一个可选实施例中,创建模块203还配置为:
利用LVM快照管理接口创建AEP存储的快照。
在本申请的一个可选实施例中,监控模块201还配置为:
基于Kubernetes的listwatch机制监控集群中其他节点中是否有AEP存储的克隆卷。
基于上述目的,本申请实施例的第三个方面,提出了一种计算机设备。图3示出的是本申请提供的计算机设备的实施例的示意图。如图3所示,本申请实施例包括如下装置:至少一个处理器S21;以及存储器S22,存储器S22存储有可在处理器上运行的计算机指令S23,指令由处理器执行时实现以下方法:
在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷;
响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷;
创建AEP存储的快照后恢复AEP存储;
将AEP存储的快照数据传输到克隆卷后,启动克隆卷。
在本申请的一个可选实施例中,还包括:
将AEP存储的快照数据按照阈值大小划分成若干个数据片。
在本申请的一个可选实施例中,将AEP存储的快照数据传输到克隆卷后,启动克隆卷包括:
将AEP存储的快照数据的一个数据片发送到克隆卷中;
克隆卷将接收到的一个数据片进行存储,并向AEP存储发送响应消息;
响应于AEP存储接收到克隆卷发送的存储成功的响应消息,将AEP存储的快照数据的下一个数据片发送到克隆卷中,直到所有的数据全部在克隆卷中成功存储。
在本申请的一个可选实施例中,还包括:
响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告。
在本申请的一个可选实施例中,响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告包括:
将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示。
在本申请的一个可选实施例中,创建AEP存储的快照后恢复AEP存储包括:
利用LVM快照管理接口创建AEP存储的快照。
在本申请的一个可选实施例中,在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷包括:
基于Kubernetes的listwatch机制监控集群中其他节点中是否有AEP存储的克隆卷。
基于上述目的,本申请实施例的第四个方面,提出了一种计算机可读 存储介质。图4示出的是本申请提供的计算机可读存储介质的实施例的示意图。如图4所示,计算机可读存储介质S31存储有被处理器执行时执行如下方法的计算机程序S32:
在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷;
响应于监控到集群中其他节点中有AEP存储的克隆卷,停止AEP存储和克隆卷;
创建AEP存储的快照后恢复AEP存储;
将AEP存储的快照数据传输到克隆卷后,启动克隆卷。
在本申请的一个可选实施例中,还包括:
将AEP存储的快照数据按照阈值大小划分成若干个数据片。
在本申请的一个可选实施例中,将AEP存储的快照数据传输到克隆卷后,启动克隆卷包括:
将AEP存储的快照数据的一个数据片发送到克隆卷中;
克隆卷将接收到的一个数据片进行存储,并向AEP存储发送响应消息;
响应于AEP存储接收到克隆卷发送的存储成功的响应消息,将AEP存储的快照数据的下一个数据片发送到克隆卷中,直到所有的数据全部在克隆卷中成功存储。
在本申请的一个可选实施例中,还包括:
响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告。
在本申请的一个可选实施例中,响应于AEP存储接收到克隆卷发送的存储失败的响应消息,停止克隆操作并发送克隆失败的警告包括:
将克隆失败的警告经由网络发送到管理员移动设备和电子邮箱,并在AEP存储所在的显示装置上显示。
在本申请的一个可选实施例中,创建AEP存储的快照后恢复AEP存储包括:
利用LVM快照管理接口创建AEP存储的快照。
在本申请的一个可选实施例中,在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有AEP存储的克隆卷包括:
基于Kubernetes的listwatch机制监控集群中其他节点中是否有AEP存储的克隆卷。
此外,根据本申请实施例公开的方法还可以被实现为由处理器执行的计算机程序,该计算机程序可以存储在计算机可读存储介质中。在该计算机程序被处理器执行时,执行本申请实施例公开的方法中限定的上述功能。
此外,上述方法步骤以及系统单元也可以利用控制器以及用于存储使得控制器实现上述步骤或单元功能的计算机程序的计算机可读存储介质实现。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本申请实施例公开的范围。
在一个或多个示例性设计中,功能可以在硬件、软件、固件或其任意组合中实现。如果在软件中实现,则可以将功能作为一个或多个指令或代码存储在计算机可读介质上或通过计算机可读介质来传送。计算机可读介质包括计算机存储介质和通信介质,该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何介质。存储介质可以是能够被通用或专用计算机访问的任何可用介质。作为例子而非限制性的,该计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储设备、磁盘存储设备或其它磁性存储设备,或者是可以用于携带或存储形式为指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器访问的任何其它介质。此外,任何连接都可以适当地称为计算机可读介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线路(DSL)或诸如红外线、无线电和微波的无线技术来从网站、服务器或其它远程源发送软件,则上述同轴线缆、光纤线缆、双绞线、DSL或诸如红外线、无线电和微波的无线技术均包括在介质的定义。如这里所使用的,磁盘和光盘包括压缩盘(CD)、激光盘、光盘、数字多功能盘(DVD)、软盘、蓝光盘,其中磁盘通常磁性地再现数据,而光盘利用激光光学地再现数据。上述内容的组合也应当包括在计算机可读介质的范围内。
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本申请实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本申请实施例公开的范围被限于这些例子;在本申请实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。
Claims (10)
- 一种存储卷跨节点克隆的方法,其特征在于,包括以下步骤:在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有所述AEP存储的克隆卷;响应于监控到集群中其他节点中有所述AEP存储的克隆卷,停止所述AEP存储和克隆卷;创建所述AEP存储的快照后恢复所述AEP存储;将所述AEP存储的快照数据传输到所述克隆卷后,启动所述克隆卷。
- 根据权利要求1所述的方法,其特征在于,还包括:将所述AEP存储的快照数据按照阈值大小划分成若干个数据片。
- 根据权利要求2所述的方法,其特征在于,将所述AEP存储的快照数据传输到所述克隆卷后,启动所述克隆卷包括:将所述AEP存储的快照数据的一个数据片发送到所述克隆卷中;所述克隆卷将接收到的一个数据片进行存储,并向所述AEP存储发送响应消息;响应于所述AEP存储接收到所述克隆卷发送的存储成功的响应消息,将所述AEP存储的快照数据的下一个数据片发送到所述克隆卷中,直到所有的数据全部在所述克隆卷中成功存储。
- 根据权利要求1所述的方法,其特征在于,响应于监控到集群中其他节点中有所述AEP存储的克隆卷,停止所述AEP存储和克隆卷包括:响应于监控到集群中其他节点中有所述AEP存储的克隆卷,使用冻结命令:fsfreeze-freeze将所述AEP存储和克隆卷进行冻结。
- 根据权利要求1所述的方法,其特征在于,创建所述AEP存储的快照后恢复所述AEP存储包括:通过所述AEP存储的名字找到映射的主机目录;在所述主机目录中通过liswatch机制获取到所述AEP存储的信息,所述信息包括所述AEP存储的容量;设置待创建的快照的名称,并将名称、容量和目录参数传入lvm快照接口中以创建所述AEP存储的快照;响应于所述AEP存储的快照创建完成,恢复所述AEP存储。
- 根据权利要求5所述的方法,其特征在于,所述lvm快照接口为lvcreate-L xxxGB-s-n lv_image_snap/dev/vg_image/lv_image,其中-L xxxGB为待创建快照大小,-s为创建快照,-n lv_image_snap为待创建快照名为lv_image_snap,/dev/vg_image/lv_image为待创建快照的逻辑卷。
- 根据权利要求1所述的方法,其特征在于,在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有所述AEP存储的克隆卷包括:基于Kubernetes的listwatch机制监控集群中其他节点中的存储卷的信息;判断监控到的信息中是否带有所述AEP存储的节点信息标签;响应于监控到的信息中带有所述AEP存储的节点信息标签,确定为其他节点中的存储卷为所述AEP存储的克隆卷。
- 一种存储卷跨节点克隆的装置,其特征在于,所述装置包括:监控模块,所述监控模块配置为在集群的节点中使用pmem-csi创建AEP存储,并监控集群中其他节点中是否有所述AEP存储的克隆卷;停用模块,所述停用模块配置为响应于监控到集群中其他节点中有所述AEP存储的克隆卷,停止所述AEP存储和克隆卷;创建模块,所述创建模块配置为创建所述AEP存储的快照后恢复所述AEP存储;传输模块,所述传输模块配置为将所述AEP存储的快照数据传输到所述克隆卷后,启动所述克隆卷。
- 一种计算机设备,其特征在于,包括:至少一个处理器;以及存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现权利要求1-7任意一项所述方法的步骤。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-7任意一项所述方法的步骤。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/278,383 US20240037120A1 (en) | 2021-09-28 | 2022-01-27 | Method for cross-node cloning of storage volume, device, apparatus and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111141286.1A CN113590049B (zh) | 2021-09-28 | 2021-09-28 | 一种存储卷跨节点克隆的方法、装置、设备及可读介质 |
CN202111141286.1 | 2021-09-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023050665A1 true WO2023050665A1 (zh) | 2023-04-06 |
Family
ID=78242329
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/074365 WO2023050665A1 (zh) | 2021-09-28 | 2022-01-27 | 一种存储卷跨节点克隆的方法、装置、设备及可读介质 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20240037120A1 (zh) |
CN (1) | CN113590049B (zh) |
WO (1) | WO2023050665A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117707438A (zh) * | 2024-02-06 | 2024-03-15 | 成都艾勃科技有限公司 | 一种分区增量克隆的方法 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113590049B (zh) * | 2021-09-28 | 2021-12-31 | 苏州浪潮智能科技有限公司 | 一种存储卷跨节点克隆的方法、装置、设备及可读介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107615255A (zh) * | 2015-06-17 | 2018-01-19 | 英特尔公司 | 利用持久存储器的计算装置和方法 |
US20190073372A1 (en) * | 2017-09-05 | 2019-03-07 | Robin Systems, Inc. | Creating Snapshots Of A Storage Volume In A Distributed Storage System |
US20200073765A1 (en) * | 2018-09-03 | 2020-03-05 | Ashish Tanwer | Distributed backup and precise recovery for consistent hashing systems |
CN111611109A (zh) * | 2020-05-22 | 2020-09-01 | 苏州浪潮智能科技有限公司 | 一种分布式集群的备份方法、系统、设备以及介质 |
CN113032091A (zh) * | 2021-02-26 | 2021-06-25 | 山东英信计算机技术有限公司 | 一种采用aep提升虚拟机存储性能的方法、系统及介质 |
CN113590049A (zh) * | 2021-09-28 | 2021-11-02 | 苏州浪潮智能科技有限公司 | 一种存储卷跨节点克隆的方法、装置、设备及可读介质 |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5852715A (en) * | 1996-03-19 | 1998-12-22 | Emc Corporation | System for currently updating database by one host and reading the database by different host for the purpose of implementing decision support functions |
US7139845B2 (en) * | 2003-04-29 | 2006-11-21 | Brocade Communications Systems, Inc. | Fibre channel fabric snapshot service |
KR101405952B1 (ko) * | 2007-12-05 | 2014-06-12 | 엘지전자 주식회사 | 데이터 블록 전송방법 |
US10452484B2 (en) * | 2014-05-15 | 2019-10-22 | Carbonite, Inc. | Systems and methods for time-based folder restore |
US10671567B2 (en) * | 2015-12-30 | 2020-06-02 | Acronis International Gmbh | System and method for optimized lock detection |
US10466919B2 (en) * | 2018-03-20 | 2019-11-05 | Dell Products, Lp | Information handling system with elastic configuration pools in flash dual in-line memory modules |
US11281492B1 (en) * | 2019-05-31 | 2022-03-22 | Juniper Networks, Inc. | Moving application containers across compute nodes |
US11392428B2 (en) * | 2019-07-17 | 2022-07-19 | Memverge, Inc. | Fork handling in application operations mapped to direct access persistent memory |
US20210064486A1 (en) * | 2019-08-28 | 2021-03-04 | Commvault Systems, Inc. | Access arbitration to a shared cache storage area in a data storage management system for live browse, file indexing, backup and/or restore operations |
CN111736764B (zh) * | 2020-05-28 | 2022-07-22 | 苏州浪潮智能科技有限公司 | 一种数据库一体机的存储系统及数据请求处理方法、装置 |
-
2021
- 2021-09-28 CN CN202111141286.1A patent/CN113590049B/zh active Active
-
2022
- 2022-01-27 WO PCT/CN2022/074365 patent/WO2023050665A1/zh active Application Filing
- 2022-01-27 US US18/278,383 patent/US20240037120A1/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107615255A (zh) * | 2015-06-17 | 2018-01-19 | 英特尔公司 | 利用持久存储器的计算装置和方法 |
US20190073372A1 (en) * | 2017-09-05 | 2019-03-07 | Robin Systems, Inc. | Creating Snapshots Of A Storage Volume In A Distributed Storage System |
US20200073765A1 (en) * | 2018-09-03 | 2020-03-05 | Ashish Tanwer | Distributed backup and precise recovery for consistent hashing systems |
CN111611109A (zh) * | 2020-05-22 | 2020-09-01 | 苏州浪潮智能科技有限公司 | 一种分布式集群的备份方法、系统、设备以及介质 |
CN113032091A (zh) * | 2021-02-26 | 2021-06-25 | 山东英信计算机技术有限公司 | 一种采用aep提升虚拟机存储性能的方法、系统及介质 |
CN113590049A (zh) * | 2021-09-28 | 2021-11-02 | 苏州浪潮智能科技有限公司 | 一种存储卷跨节点克隆的方法、装置、设备及可读介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117707438A (zh) * | 2024-02-06 | 2024-03-15 | 成都艾勃科技有限公司 | 一种分区增量克隆的方法 |
CN117707438B (zh) * | 2024-02-06 | 2024-05-14 | 成都艾勃科技有限公司 | 一种分区增量克隆的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN113590049B (zh) | 2021-12-31 |
US20240037120A1 (en) | 2024-02-01 |
CN113590049A (zh) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10108367B2 (en) | Method for a source storage device sending data to a backup storage device for storage, and storage device | |
KR101547719B1 (ko) | 데이터 센터들에 걸쳐 데이터 서버들내 데이터 무결정의 유지 | |
US9535907B1 (en) | System and method for managing backup operations of virtual machines | |
US10353790B1 (en) | Disaster recovery rehearsals | |
WO2023050665A1 (zh) | 一种存储卷跨节点克隆的方法、装置、设备及可读介质 | |
US7383407B1 (en) | Synchronous replication for system and data security | |
CN108984107B (zh) | 提高存储系统的可用性 | |
CN101808127B (zh) | 数据备份方法、系统和服务器 | |
US20150286424A1 (en) | Marking a flashcopy backup for collapse without breaking a flashcopy chain | |
US9817719B2 (en) | Efficient Flashcopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation with reuse and from a shared resource pool | |
US10409999B2 (en) | Communication between key manager and storage subsystem kernel via management console | |
US11892982B2 (en) | Facilitating immediate performance of volume resynchronization with the use of passive cache entries | |
US9454315B2 (en) | Efficient flashcopy backup target volume allocation from a shared resource pool while ingesting a flashcopy backup in a repository | |
EP3731099B1 (en) | System and method for accelerating application service restoration | |
US9817723B2 (en) | Efficient FlashCopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation with reuse | |
US9513996B2 (en) | Information processing apparatus, computer-readable recording medium having stored program for controlling information processing apparatus, and method for controlling information processing apparatus | |
US9542106B2 (en) | Efficient repository ingest of a target volume without breaking a flashcopy chain | |
CN115826876A (zh) | 数据写入方法、系统、存储硬盘、电子设备及存储介质 | |
CN113821168A (zh) | 一种共享存储迁移系统、方法及电子设备和存储介质 | |
CN113687790A (zh) | 数据重构方法、装置、设备及存储介质 | |
US9817718B2 (en) | Efficient flashcopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation from a shared resource pool | |
US8819481B2 (en) | Managing storage providers in a clustered appliance environment | |
US8738581B1 (en) | Using multiple clients for data backup | |
US12050558B2 (en) | Facilitating immediate performance of volume resynchronization with the use of passive cache entries | |
US11182261B1 (en) | Synchronizing a stale component of a distributed object using multiple delta components during maintenance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22874068 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 18278383 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |