WO2019015288A1 - 数据持久化处理的方法、装置、系统及可读存储介质 - Google Patents

数据持久化处理的方法、装置、系统及可读存储介质 Download PDF

Info

Publication number
WO2019015288A1
WO2019015288A1 PCT/CN2018/073956 CN2018073956W WO2019015288A1 WO 2019015288 A1 WO2019015288 A1 WO 2019015288A1 CN 2018073956 W CN2018073956 W CN 2018073956W WO 2019015288 A1 WO2019015288 A1 WO 2019015288A1
Authority
WO
WIPO (PCT)
Prior art keywords
volume
persistent
storage
persistence processing
data persistence
Prior art date
Application number
PCT/CN2018/073956
Other languages
English (en)
French (fr)
Inventor
周雷
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP18834444.4A priority Critical patent/EP3657358B1/en
Publication of WO2019015288A1 publication Critical patent/WO2019015288A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the field of virtualization technologies, and in particular, to a method, an apparatus, a system, and a readable storage medium for data persistence processing.
  • virtual container management platforms such as Google's open source container cluster management system Kubernetes can provide various functions such as resource scheduling, deployment operation, service discovery, capacity expansion and other shrinkage for its mounted containerized applications. Since the internal data of the containerized application will die out with the demise, restart, and migration of the application itself, the data persistent storage of the containerized application is a service item that is frequently selected by the user.
  • PV persistent volume declaration
  • PV persistent volume
  • PV virtual container management platform Kubernetes or OpenShift.
  • NAS network access storage
  • the main purpose of the present disclosure is to provide a method, an apparatus, a system, and a readable storage medium for performing persistence processing on data, which are intended to solve the information security caused by persistently storing internal data of a containerized application in the prior art. Low technical problems with poor user experience.
  • the present disclosure provides a data persistence processing method performed on data, the data including a containerized application mounted on a virtual container management platform, and the data persistence processing method includes the following steps: When detecting a persistent processing instruction for the containerized application, acquiring volume attribute information and volume content of the containerized application based on the persistent processing instruction; and based on the volume attribute information, in a corresponding network access storage (NAS) a storage volume is created in the type server, and the volume content is stored in the storage volume; and a persistent volume directory corresponding to the volume content is created in the NAS type server based on the volume attribute information, and Create path information for the persistent volume on the virtual container management platform.
  • NAS network access storage
  • the present disclosure further provides a data persistence processing apparatus, the data persistence processing apparatus including: a memory, a processor, a communication bus, and a data persistence processing program stored in the memory,
  • the communication bus is configured to implement a communication connection between the processor and the memory, the processor being configured to execute the data persistence processing program to perform the step of: detecting persistence of a containerized application Processing the instruction, acquiring volume attribute information and volume content of the containerized application based on the persistent processing instruction; creating a storage volume in a corresponding network access storage (NAS) type server based on the volume attribute information, and Storing the volume content in the storage volume; and creating a persistent volume directory corresponding to the volume content in the NAS type server based on the volume attribute information, and creating a persistence on the virtual container management platform The path information of the volume.
  • NAS network access storage
  • the present disclosure further provides a data persistence processing system including a virtual container management platform, a system server, and a data persistence processing device implementing the data persistence processing method.
  • the present disclosure also provides a readable storage medium in which one or more data persistence processing programs are stored, the one or more data persistence processing The program may be executed by one or more processors to implement the steps of the data persistence processing method described above: when the persistence processing instruction for the containerized application is detected, the containerization is obtained based on the persistence processing instruction Volume attribute information and volume content of the application; creating a storage volume in a corresponding network access storage (NAS) type server based on the volume attribute information, and storing the volume content in the storage volume; and based on the volume Attribute information, creating a persistent volume directory corresponding to the volume content in the NAS type server, and creating path information of the persistent volume on the virtual container management platform.
  • NAS network access storage
  • FIG. 1 is a schematic flow chart of a first embodiment of a data persistence processing method of the present disclosure
  • FIG. 2 is a schematic flow chart of a second embodiment of a data persistence processing method of the present disclosure
  • FIG. 3 is a schematic flow chart of a third embodiment of a data persistence processing method of the present disclosure.
  • FIG. 4 is a schematic flow chart of a fourth embodiment of a data persistence processing method of the present disclosure.
  • FIG. 5 is a schematic flowchart diagram of a fifth embodiment of a data persistence processing method of the present disclosure.
  • FIG. 6 is a schematic flow chart of a sixth embodiment of a data persistence processing method of the present disclosure.
  • FIG. 7 is a schematic diagram of a data persistence processing system composed of a virtual container management platform, a system server, and a data persistence processing device of the present disclosure
  • FIG. 8 is a schematic diagram of a device structure of a hardware operating environment involved in a data persistence processing method according to various embodiments of the present disclosure.
  • the present disclosure provides a data persistence processing method for data execution.
  • the data persistence processing method is applied to a data persistence processing device, and the data persistence processing
  • the device may be a Google Open Source Container Cluster Management System (Kubernetes) or a data persistence processing device on the Red Hat Commercial Container Cluster Management System (OpenShift), the container including a containerized application mounted on the virtual container management platform Kubernetes or OpenShift. .
  • the data persistence processing method is applied to a data persistence processing device in a Google open source container cluster management system (Kubernetes) or a Red Hat commercial container cluster management system (OpenShift), and the data includes a container cluster mounted on Google open source.
  • the software that provides data persistent storage on the upper virtual container management platform can be used by Google's open source container cluster management system (Kubernetes) or Red Hat commercial container cluster management system (OpenShift) data persistence processing device.
  • a containerized application that requires persistent storage is persistently stored in the corresponding target storage and generates a query or access path to the containerized application.
  • a schematic diagram of a data persistence processing system consisting of a virtual container management platform, a target memory or a system server, and a data persistence processing device is shown in FIG.
  • the first embodiment of the data persistence processing method includes the following steps:
  • step S10 when a persistence processing instruction for the containerized application is detected, the volume attribute information and the volume content of the containerized application are acquired based on the persistent processing instruction.
  • the registered user or tenant of the upper virtual container management platform may request persistent in the corresponding containerized application interface.
  • Storage service After the user requests the persistent storage service by means of a mouse click or a touch screen touch, the user generates request information, and the request information may be a representation state, and the restful information may be passed through the user in the container.
  • the interface of the application is selected, and the Restful information carries information such as a volume type (Fstype), a volume name (Volume Name), and a volume size (Volume Size) of the containerized application.
  • the NAS type server can be obtained by the user, that is, the type of NAS server that the user needs to store the containerized application persistently.
  • NAS server types include Network File System (NFS) system servers, Distributed Storage (GlusterFS) system servers, Distributed Storage (Ceph) system servers, and the like.
  • NFS Network File System
  • GlusterFS Distributed Storage
  • Ceph Distributed Storage
  • the upper virtual container management platform After obtaining the request information of the user, the upper virtual container management platform sends a persistent processing instruction to the containerized application based on the request information, and the data persistence processing device invokes the corresponding virtual container management platform (Kubernetes or OpenShift) based on the persistent processing instruction.
  • volume attribute information and the volume content of the containerized application obtained by the interface, wherein the volume attribute information and the volume content may constitute all internal data of the containerized application, and the volume attribute information may be obtained by the data persistence processing device in Kubernetes based on the request information. Or abstracted from all the internal data of the containerized application.
  • the volume content may be the file content of the containerized application
  • the volume attribute information may be the name of the file, and the like.
  • step S20 a storage volume is created in a network access storage (NAS) type server based on the volume attribute information, and the volume content is stored in the storage volume.
  • NAS network access storage
  • the data persistence processing device After acquiring the volume attribute information, the data persistence processing device parses the volume attribute information to obtain a containerized application or a target NAS type server or a target database that persistently stores internal data of the containerized application. After confirming the target NAS type server or the target database, the data persistence processing device invokes a persistent processing interface of the virtual container management platform (Kubernetes or OpenShift), and controls to create a storage volume in the target NAS type server, and in the storage volume. Store the contents of the corresponding volume.
  • the virtual container management platform Kerubernetes or OpenShift
  • step S30 based on the volume attribute information, a persistent volume directory corresponding to the volume content is created in the NAS type server, and path information of the persistent volume is created on the virtual container management platform.
  • the path information of the persistent volume includes a persistent volume declaration (PVC) and a persistent volume (PV), and the persistent volume directory corresponding to the volume content is created in the NAS type server, and then virtualized.
  • PVC persistent volume declaration
  • PV persistent volume directory
  • Create path information for persistent volumes on the container management platform (Kubernetes or OpenShift) such as persistent volume declarations (PVCs), persistent volumes (PVs), and so on.
  • the target NAS type server obtained by resolving the volume attribute information is a distributed storage (GlusterFS) system server
  • a persistent volume directory is created on the GlusterFS server by using Secure Shell Protocol (SSH) control, and the directory name is named.
  • SSH Secure Shell Protocol
  • Namespace name splicing or + volume name (Volume Name).
  • the capacity of the storage volume that is, the volume capacity
  • the PV name is in the form of a Namespace splicing Volume Name.
  • the record status of the storage volume is changed to create the PV state (Create_PV), and based on the storage volume in the created PV state, a name named Namespace splicing Volume Name is created on the corresponding virtual container management platform (Kubernetes or OpenShift).
  • PV the name of the PVC is recorded in the PV.
  • the order in which the persistent volume directory, PVC, and PV are created may be changed without particular limitation.
  • the volume attribute information and the volume content of the containerized application are acquired based on the persistent processing instruction; and the network is connected based on the volume attribute information.
  • NAS storage-in-a-ware
  • the information of the NAS type server solves the technical problem that the information security risk is caused when the internal data of the containerized application is persistently stored, and the user is time-consuming and labor-intensive, and the experience is poor.
  • the path information of the persistent volume includes a persistent volume declaration (PVC) and a persistent volume (PV), and the step S30 includes the following steps:
  • step S31 when it is detected that the storage volume completes storage of the volume content, the state of the storage volume is recorded as creating an initial state
  • step S32 the persistent volume directory corresponding to the volume content is created in the NAS type server based on the storage volume in the initial state and the volume attribute information, and the storage volume is Change the status to create a PVC state;
  • step S33 based on the storage volume in the created PVC state and the volume attribute information, create a PVC corresponding to the volume content on the virtual container management platform, and change the state of the storage volume to Create a PV state;
  • step S34 based on the storage volume in the created PV state, and based on the mapping relationship between the PVC and the PV in the volume attribute information, a PV corresponding to the volume content is created on the virtual container management platform.
  • the target NAS type server obtained by parsing the volume attribute information is a network file system (NFS) system server
  • NFS network file system
  • a persistent volume directory is created on the NFS system server based on the storage volume in the initial state, and the directory name is Named for the Namespace name or the Volume Name.
  • change the state of the storage volume to create a PVC state and automatically create a PVC under the namespace of the virtual container management platform (Kubernetes or OpenShift), and record the storage volume in the PVC.
  • the capacity is the volume capacity, and the name of the PV to be created or created is recorded in the PVC.
  • the PV name is in the form of a Namespace splicing Volume Name.
  • the order in which the persistent volume directory, the PVC, and the PV are created may be changed or interchanged, and is not particularly limited. In other words, any other order may be employed differently from the creation order in the second embodiment.
  • the state of the storage volume is recorded as an initial state created; and the storage volume and the volume attribute information based on the initial state is created.
  • the ability to create persistent volume directories, PVCs, and PVs solves the technical problem of information security risks caused by persistent storage of internal data of containerized applications, and the user is time-consuming and labor-intensive.
  • step S30 further includes the following steps after the step S34:
  • step S35 when it is detected that the PV creation corresponding to the volume content is completed, the state of the storage volume is changed to create a check state;
  • step S36 the persistent volume directory, the PVC, the PV, and the association relationship between the PVC and the PV are inquired and checked based on the storage volume in the creation check state;
  • step S37 when it is detected that the persistent volume directory, the PVC, the PV exists, and the association relationship between the PVC and the PV meets the mapping relationship between the PVC and the PV in the volume attribute information, the state of the storage volume is changed. Is available.
  • the status of the storage volume is changed to the query check status, and the relationship between the created persistent volume directory, PVC, PV, and PVC and PV is checked and processed.
  • the persistent volume directory, the PVC, and the PV are detected, and the relationship between the PVC and the PV is in accordance with the mapping relationship between the PVC and the PV in the volume attribute information, the state of the storage volume is changed to an available state; when a leak or an error occurs , generate an error report, and regenerate the storage volume.
  • the state of the storage volume is changed to a create check state; and the persistence is performed based on the storage volume in the create check state.
  • the volume directory, the PVC, the PV, and the relationship between the PVC and the PV are checked.
  • the persistent volume directory, the PVC, and the PV are detected, and the association between the PVC and the PV is consistent with the PVC and PV in the volume attribute information.
  • the mapping relationship is changed, the state of the storage volume is changed to an available state. Because the query check is performed after the creation of the persistent volume directory, PVC, and PV is completed, the phenomenon that the application container fails to persistently store the storage cannot be promptly prevented.
  • the data persistence processing method further includes the following steps after step S30:
  • step S40 when an uninstall instruction for the storage volume is detected, the persistent volume directory in the storage volume, the path information of the persistent volume, and the volume content are sequentially unloaded based on the uninstall instruction.
  • the path information of the virtual container management platform (Kubernetes or OpenShift) is obtained based on the uninstallation instruction, and the target storage volume is queried according to the path information, and the target is sequentially uninstalled.
  • Persistent volume directories in storage volumes path information for persistent volumes such as PVC, PV, and volume contents.
  • the persistent volume directory in the storage volume, the path information of the persistent volume, and the volume content are sequentially unloaded based on the uninstall instruction. Since the storage volume can be unloaded in an orderly manner after the storage volume is created, the user does not need to manually obtain the memory information, thereby improving the user experience and information security performance.
  • the data persistence processing method further includes the following steps after step S30:
  • step S40 when a modification instruction to the storage volume is detected, path information of the original persistent volume in the storage volume is deleted based on the modification instruction, and path information of the new persistent volume is established;
  • step S50 based on the modification instruction, the quota modifies the volume content and the persistent volume directory in the storage volume.
  • the path information of the original persistent volume in the storage volume is deleted based on the modification instruction, and the path information of the persistent volume is re-established based on the content of the storage volume, such as a new PVC. And PV.
  • the quota modifies the volume contents and the persistent volume directory in the storage volume.
  • the quota modification means that the modified content of the containerized application is synchronously modified in the storage volume. If the volume parameters are different due to the modification of the containerized application content, the persistent volume directory is modified synchronously based on the modified volume parameter.
  • the path information of the original persistent volume in the storage volume is deleted based on the modification instruction, and path information of the new persistent volume is established; Based on the modification instruction, the quota modifies the volume content and the persistent volume directory in the storage volume. Since the modification is automatic, it does not require manual modification by the user, thus improving the user experience.
  • the data persistence processing method further includes the following steps after step S30:
  • step S40 when a query instruction for the storage volume is detected, information of the storage volume is obtained from the NAS type server based on the query instruction, and the information of the storage volume is encapsulated and returned.
  • the information of the storage volume is obtained from the NAS type server based on the query instruction, and the information of the storage volume is encapsulated and returned, wherein when the storage volume is queried, the direct The storage volume information is returned from the database and encapsulated into a Json format message reply.
  • the information of the storage volume is obtained from the NAS type server based on the query instruction, and the information of the storage volume is encapsulated and returned. Therefore, the information of the storage volume can be quickly queried to improve the user experience.
  • the volume attribute information includes information of a volume type, a volume namespace, a volume name, and a volume capacity
  • the NAS type server includes a network file system (NFS) system server and a distributed storage (GlusterFS) system. Server and distributed storage (Ceph) system server.
  • the NAS type server includes a network file system (NFS) system server, a distributed storage (GlusterFS) system server, a distributed storage (Ceph) system server, etc., it is possible to accurately containerize based on volume attribute information.
  • the application is stored to the appropriate memory.
  • the volume attribute information includes information of a volume type, a volume namespace, a volume name, and a volume capacity
  • the NAS type server includes a network file system (NFS) system server, a distributed storage (GlusterFS) system server, and a distribution.
  • NFS network file system
  • GlusterFS distributed storage
  • a (Ceph) system server thus enabling accurate storage of containerized applications to corresponding memory based on volume attribute information.
  • FIG. 8 is a schematic diagram of a device structure of a hardware operating environment involved in an exemplary data persistence processing method of the present disclosure.
  • the exemplary data persistence processing device of the present disclosure may be a personal computer (PC), or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving Picture Experts Group Audio Layer III). ) Player, MP4 (Moving Picture Experts Group Audio Layer IV) player, portable computer and other terminal devices.
  • PC personal computer
  • MP3 Motion Picture Experts Group Audio Layer III
  • MP4 Motion Picture Experts Group Audio Layer IV
  • the data persistence processing apparatus may include a processor 1001 such as a CPU, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is configured to implement connection communication between the processor 1001 and the memory 1005.
  • the memory 1005 may be a high speed RAM (random access memory) or a non-volatile memory such as a disk memory.
  • the memory 1005 may also be a storage device independent of the processor 1001 described above.
  • the data persistence processing device may further include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.
  • the user interface may include a display, an input unit such as a keyboard, and the user interface may also include a standard wired interface, a wireless interface.
  • the network interface may include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • FIG. 8 does not constitute a limitation on the data persistence processing apparatus, and may include more or less components than those illustrated, or may combine some Parts, or arranged in different parts.
  • an operating system may be included in the memory 1005 as a computer storage medium.
  • An operating system is a program that manages and controls the hardware and software resources of a data persistence processing device that supports the operation of data persistence handlers and other software and/or programs.
  • the network communication module implements communication between components within the memory 1005 and communication between internal components and other hardware and software in the data persistence processing device.
  • the processor 1001 is configured to execute a data persistence processing program stored in the memory 1005 to perform the following steps: when a persistent processing instruction for the containerized application is detected, based on The persistence processing instruction acquires volume attribute information and volume content of the containerized application; and based on the volume attribute information, creates a storage volume in a corresponding network access storage (NAS) type server, and stores the storage volume in the storage volume The volume content; and based on the volume attribute information, creating a persistent volume directory corresponding to the volume content in the NAS type server, and creating path information of the persistent volume on the virtual container management platform.
  • NAS network access storage
  • the path information of the persistent volume includes a persistent volume declaration (PVC) and a persistent volume (PV), and the persistent creation corresponding to the volume content is created in the NAS type server
  • the step of creating a volume directory and creating path information of the persistent volume on the virtual container management platform includes the step of: when detecting that the storage volume completes storage of the volume content, The status record is to create an initial state; the persistent volume directory corresponding to the volume content is created in the NAS type server based on the storage volume in the initial state and the volume attribute information, and the The state of the storage volume is changed to create a PVC state; based on the storage volume in the created PVC state and the volume attribute information, a PVC corresponding to the volume content is created on the virtual container management platform, and the storage is performed Changing the state of the volume to create a PV state; and based on the storage volume in the created PV state, and creating and describing on the virtual container management platform based on the mapping relationship between the PVC and the PV in the volume attribute information Corresponding to the
  • the creating a persistent volume corresponding to the volume content in the NAS type server further includes the step of: changing the state of the storage volume to when the PV creation corresponding to the volume content is detected is completed Creating an inspection state; performing a query check on the persistent volume directory, the PVC, the PV, and the association relationship between the PVC and the PV based on the storage volume in the creation check state; and when detecting the persistent volume directory, the PVC When the PV exists and the relationship between the PVC and the PV matches the mapping relationship between the PVC and the PV in the volume attribute information, the state of the storage volume is changed to an available state.
  • the data persistence processing method further includes the steps of: sequentially uninstalling the persistent volume directory in the storage volume, the path information of the persistent volume, and the path information based on the uninstallation instruction when the uninstall instruction of the storage volume is detected Volume content.
  • the data persistence processing method further includes the following steps: when detecting a modification instruction to the storage volume, deleting path information of the original persistent volume in the storage volume based on the modification instruction, and establishing a new persistent The path information of the volume; and based on the modification instruction, the quota modifies the volume content and the persistent volume directory in the storage volume.
  • the processing method further includes the following steps: when detecting a query instruction for the storage volume, acquiring information of the storage volume from the NAS type server based on the query instruction, and information of the storage volume The package returns.
  • the volume attribute information includes information about a volume type, a volume namespace, a volume name, and a volume capacity
  • the NAS type server includes a network file system (NFS) system server and a distributed storage (GlusterFS) system server. And distributed storage (Ceph) system servers.
  • the embodiment of the data persistence processing apparatus of the present disclosure is substantially the same as the embodiment of the data persistence processing method described above, and details are not described herein again.
  • the present disclosure further provides a data persistence processing system including a virtual container management platform, a system server, and a data persistence processing device implementing the data persistence processing method.
  • the embodiments of the data persistence processing system of the present disclosure are substantially the same as the embodiments of the data persistence processing method described above, and are not described herein again.
  • the present disclosure also provides a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement any of the above The steps of the data persistence processing method described in the item.
  • the embodiments of the readable storage medium of the present disclosure are substantially the same as the embodiments of the data persistence processing method described above, and are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据持久化处理的方法、装置、系统及可读存储介质。所述方法包括:当检测到对容器化应用的持久化处理指令时,基于持久化处理指令获取容器化应用的卷属性信息与卷内容(S10);基于卷属性信息,在网络接入式存储NAS类型服务器中创建存储卷,并在存储卷中存储卷内容(S20);基于卷属性信息,在NAS类型服务器中创建与卷内容对应的持久化卷目录并在虚拟容器管理平台上创建持久化卷的路径信息(S30)。

Description

数据持久化处理的方法、装置、系统及可读存储介质 技术领域
本公开涉及虚拟化技术领域,尤其涉及一种数据持久化处理的方法、装置、系统及可读存储介质。
背景技术
随着虚拟化技术的兴起,如谷歌开源容器集群管理系统Kubernetes等虚拟容器管理平台能为其挂载的容器化应用提供资源调度、部署运行、服务发现、扩容缩容等各种功能服务。由于容器化应用的内部数据会随着该应用本身的消亡、重启、迁移而消亡,所以容器化应用的数据持久化存储更是用户常选的服务项目。
在一些情况下,为解决容器化应用的数据持久化存储问题,用户需在虚拟容器管理平台Kubernetes或OpenShift上手动创建容器化应用数据的路径信息,如持久化卷声明(PVC)和持久化卷(PV),其中,PV是待持久地存储在相应服务器端的数据的抽象,PVC是PV的抽象声明。PVC与PV是一一对应关系,且需在虚拟容器管理平台Kubernetes或OpenShift上获取网络接入式存储(NAS)服务器的IP地址、用户名、密码、类型等信息,才能实现将容器化应用的内部数据持久地保存至网络接入式存储(NAS)服务器中。因此,在持久化存储容器应用的内部数据时造成的存在信息安全隐患且用户体验差。
公开内容
本公开的主要目的在于提供一种对数据执行持久化处理的方法、装置、系统及可读存储介质,旨在解决现有技术中在持久化存储容器化应用的内部数据时造成的信息安全度低且用户体验差的技术问题。
为实现上述目的,本公开提供一种对数据执行的数据持久化处理方法,所述数据包括挂载在虚拟容器管理平台上的容器化应用,所述数据持久化处理方法包括下述步骤:当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信 息与卷内容;基于所述卷属性信息,在相应网络接入式存储(NAS)类型服务器中创建存储卷,并在该存储卷中存储所述卷内容;以及基于所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息。
此外,为实现上述目的,本公开还提供一种数据持久化处理装置,所述数据持久化处理装置包括:存储器、处理器,通信总线以及存储在所述存储器中的数据持久化处理程序,所述通信总线配置为实现所述处理器与所述存储器之间的通信连接,所述处理器配置为执行所述数据持久化处理程序,以实施以下步骤:当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信息与卷内容;基于所述卷属性信息,在相应网络接入式存储(NAS)类型服务器中创建存储卷,并在该存储卷中存储所述卷内容;以及基于所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息。
此外,为实现上述目的,本公开还提供一种数据持久化处理系统,所述数据持久化处理系统包括虚拟容器管理平台、系统服务器、以及实施上述数据持久化处理方法的数据持久化处理装置。
此外,为实现上述目的,本公开还提供一种可读存储介质,在所述可读存储介质中存储有一个或者更多的数据持久化处理程序,所述一个或者更多的数据持久化处理程序可被一个或者更多的的处理器执行以实施上述数据持久化处理方法的下述步骤:当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信息与卷内容;基于所述卷属性信息,在相应网络接入式存储(NAS)类型服务器中创建存储卷,并在该存储卷中存储所述卷内容;以及基于所述卷属性信息,在所述NAS类型服务器中创建与所述 卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息。
附图说明
图1是本公开的数据持久化处理方法的第一实施例的流程示意图;
图2是本公开的数据持久化处理方法的第二实施例的流程示意图;
图3是本公开的数据持久化处理方法的第三实施例的流程示意图;
图4是本公开的数据持久化处理方法的第四实施例的流程示意图;
图5是本公开的数据持久化处理方法的第五实施例的流程示意图;
图6是本公开的数据持久化处理方法的第六实施例的流程示意图;
图7是本公开的由虚拟容器管理平台、系统服务器以及数据持久化处理装置组成的数据持久化处理系统的示意图;以及
图8是本公开的各个实施例的数据持久化处理方法涉及的硬件运行环境的装置结构的示意图。
本公开的目的的实现手段、功能特点及技术优点将结合实施例、参照附图做进一步说明。
具体实施方式
应当理解,本文所描述的实施例仅仅用以解释本公开,并不用于限定本公开。
本公开提供一种对数据执行的数据持久化处理方法,在本公开的数据持久化处理方法的实施例中,所述数据持久化处理方法应用于数据持久化处理装置,所述数据持久化处理装置可是谷歌开源的容器集 群管理系统(Kubernetes)或红帽商用容器集群管理系统(OpenShift)上的数据持久化处理装置,所述数据包括挂载在虚拟容器管理平台Kubernetes或者OpenShift上的容器化应用。
本公开中,数据持久化处理方法应用于谷歌开源的容器集群管理系统(Kubernetes)或红帽商用容器集群管理系统(OpenShift)中的数据持久化处理装置,数据包括挂载在谷歌开源的容器集群管理系统(Kubernetes)上的容器化应用,谷歌开源的容器集群管理系统(Kubernetes)或红帽商用容器集群管理系统(OpenShift)的数据持久化处理装置包括存储管理组件等,其中,存储管理组件也可是封装在上层虚拟容器管理平台上的提供数据持久化存储的软件,通过谷歌开源的容器集群管理系统(Kubernetes)或红帽商用容器集群管理系统(OpenShift)的数据持久化处理装置,能够将用户需求持久化存储的容器化应用持久地存储至对应的目标存储器中,并生成指向该容器化应用的查询或者访问路径。由虚拟容器管理平台、目标存储器或系统服务器以及数据持久化处理装置组成的数据持久化处理系统示意图如图7所示。
参照图1,所述数据持久化处理方法的第一实施例包括下述步骤:
在步骤S10中,当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信息与卷内容。
本公开中,在上层虚拟容器管理平台中的数据持久化处理装置检测到对容器化应用的持久化处理指令之前,上层虚拟容器管理平台的注册用户或者租户可在相应的容器化应用界面请求持久化存储服务。用户在相应的容器化应用界面以鼠标点击或者触屏触摸的方式请求持久化存储服务后,生成请求信息,该请求信息可是表述性状态传递Restful信息,表述性状态传递Restful信息可通过用户在容器化应用的界面上选取得到,该Restful信息中携带容器化应用的卷类型(Fstype),卷名称(Volume Name),卷容量(Volume Size)等信息。基于容器化应用的卷类型(Fstype),可获取用户需求的NAS类型服务器,即获取用户需将容器化应用持久化存储至哪种类型的NAS服务器中。 NAS服务器类型包括网络文件系统(NFS)系统服务器、分布式存储(GlusterFS)系统服务器、分布式存储(Ceph)系统服务器等。上层虚拟容器管理平台在获取用户的请求信息后,基于该请求信息发送对容器化应用的持久化处理指令,数据持久化处理装置基于该持久化处理指令调用相应虚拟容器管理平台(Kubernetes或OpenShift)的接口获取的容器化应用的卷属性信息与卷内容,其中,卷属性信息与卷内容可是构成容器化应用的全部内部数据,卷属性信息可是Kubernetes中的数据持久化处理装置基于请求信息获取得到或者从容器化应用的全部内部数据中抽象得到。以实例进行说明,卷内容可是容器化应用的文件内容,卷属性信息可是该文件的名称等。
在步骤S20中,基于所述卷属性信息,在网络接入式存储(NAS)类型服务器中创建存储卷,并在该存储卷中存储所述卷内容。
在获取卷属性信息后,数据持久化处理装置对卷属性信息进行解析处理,以获取容器化应用或者持久地存储容器化应用的内部数据的目标NAS类型服务器或者目标数据库。在确认目标NAS类型服务器或者目标数据库后,数据持久化处理装置调用虚拟容器管理平台(Kubernetes或OpenShift)的持久化处理接口,并控制在目标NAS类型服务器中创建存储卷,并在该存储卷中存储相应卷内容。
在步骤S30中,基于所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息。
其中,持久化卷的路径信息包括持久化卷声明(PVC)和持久化卷(PV),可先在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录后,再在虚拟容器管理平台(Kubernetes或OpenShift)上创建持久化卷的路径信息如持久化卷声明(PVC),持久化卷(PV)等。
以实例进行说明,当解析卷属性信息获取的目标NAS类型服务器为分布式存储(GlusterFS)系统服务器时,通过安全外壳协议(SSH)控制在GlusterFS服务器上创建持久化卷目录,其目录名称为命名空间(Namespace)名称拼接或+卷名称(Volume Name)的形式。在持久 化卷目录创建完成后,将存储卷的记录状态改为创建终止态(Create_Endpoints),根据处于创建终止态的存储卷与卷属性信息,在虚拟容器管理平台(Kubernetes或OpenShift)的相应命名空间(Namespace)下创建容器化应用在GlusterFS服务器中的各个节点的IP地址信息,并在创建完成后将存储卷的记录状态改为创建PVC态(Create_PVC)。基于处于创建PVC态的存储卷,在虚拟容器管理平台(Kubernetes或OpenShift)的相应命名空间(Namespace)下创建一个PVC,PVC的名称和存储卷的名称相同。在PVC中记录了存储卷的容量即卷容量,并在PVC中记录待创建或者已创建的PV的名称,PV名称为Namespace拼接Volume Name的形式。完成PVC创建后将存储卷的记录状态改为创建PV态(Create_PV),并基于处于创建PV态的存储卷,在相应虚拟容器管理平台(Kubernetes或OpenShift)上创建一个名称为Namespace拼接Volume Name的PV,在PV中记录PVC的名称。另外,持久化卷目录、PVC、PV的创建顺序可以变更,并不做特别限制。
在本实施例中,当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信息与卷内容;基于所述卷属性信息,在网络接入式存储(NAS)类型服务器中创建存储卷,并在该存储卷中存储所述卷内容;基于所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息。由于通过数据持久化处理装置抽象获取容器化应用的卷属性信息与卷内容并基于该卷属性信息与该卷内容创建持久化卷目录、PVC、PV,即此过程无需用户手动创建且用户无需知晓NAS类型服务器的信息,因而解决了持久地存储容器化应用的内部数据时造成的存在信息安全隐患且用户费时费力、体验差的技术问题。
在本公开的数据持久化处理方法的第一实施例的基础上,提供数据持久化处理方法的第二实施例。在第二实施例中,参照图2,持久化卷的路径信息包括持久化卷声明(PVC)和持久化卷(PV),所述步 骤S30包括下述步骤:
在步骤S31中,当检测到所述存储卷完成了所述卷内容的存储时,将存储卷的状态记录为创建初始态;
在步骤S32中,基于处于创建初始态的所述存储卷与所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的所述持久化卷目录,并将所述存储卷的状态更改为创建PVC态;
在步骤S33中,基于处于创建PVC态的所述存储卷与所述卷属性信息,在所述虚拟容器管理平台上创建与所述卷内容对应的PVC,并将所述存储卷的状态更改为创建PV态;以及
在步骤S34中,基于处于创建PV态的所述存储卷,并基于所述卷属性信息中的PVC与PV的映射关系,在所述虚拟容器管理平台上创建与所述卷内容对应的PV。
以实例进行说明,当解析卷属性信息获取的目标NAS类型服务器为网络文件系统(NFS)系统服务器时,基于处于创建初始态的存储卷,在NFS系统服务器上创建持久化卷目录,其目录名称为命名空间(Namespace)名称拼接或+卷名称(Volume Name)的形式。在持久化卷目录创建完成后,将存储卷的状态更改为创建PVC态,并在虚拟容器管理平台(Kubernetes或OpenShift)的命名空间(Namespace)下自动创建PVC,在PVC中记录了存储卷的容量即卷容量,并在PVC中记录待创建或者已创建的PV的名称,PV名称为Namespace拼接Volume Name的形式。完成PVC创建后将存储卷的记录状态改为创建PV态(Create_PV),并在相应虚拟容器管理平台(Kubernetes或OpenShift)上创建一个名称为Namespace拼接Volume Name的PV,在PV中记录PVC的名称,通过PVC与PV,能够查询存储在网络文件系统(NFS)系统服务器中的存储卷。
另外,如前所述,持久化卷目录、PVC、PV三者的创建顺序可以变更或互换,并不做特别的限定。换言之,也可以与第二实施例中的创建顺序不同而采用其它任何顺序。
在本实施例中,当检测到所述存储卷完成了所述卷内容的存储时,将存储卷的状态记录为创建初始态;基于处于创建初始态的所述存储 卷与所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录,并将存储卷的状态更改为创建PVC态;基于处于创建PVC态的所述存储卷与所述卷属性信息,在所述虚拟容器管理平台(Kubernetes或OpenShift)上创建与所述卷内容对应的PVC,并将存储卷的状态更改为创建PV态;基于处于创建PV态的所述存储卷,并基于所述卷属性信息中的PVC与PV的映射关系,在所述虚拟容器管理平台上创建与所述卷内容对应的PV。由于能够创建持久化卷目录、PVC与PV,因而解决了持久地存储容器化应用的内部数据时造成的存在信息安全隐患且用户费时费力、体验差的技术问题。
在本公开的数据持久化处理方法的第二实施例的基础上,提供数据持久化处理方法的第三实施例。在第三实施例中,如图3所示,所述步骤S30在步骤S34之后还包括下述步骤:
在步骤S35中,当检测到与所述卷内容对应的PV创建完成时,将所述存储卷的状态更改为创建检查态;
在步骤S36中,基于处于创建检查态的所述存储卷,对所述持久化卷目录、PVC、PV、以及PVC与PV的关联关系进行查询检查;以及
在步骤S37中,当检测到所述持久化卷目录、PVC、PV存在且PVC与PV的关联关系符合所述卷属性信息中的PVC与PV的映射关系时,将所述存储卷的状态更改为可用状态。
在持久化卷目录、PVC、PV创建完成后,将存储卷的状态更改为查询检查状态,并对已创建的持久化卷目录、PVC、PV以及PVC与PV的关联关系进行查询检查处理;当检测到所述持久化卷目录、PVC、PV存在且PVC与PV的关联关系符合卷属性信息中的PVC与PV的映射关系时,将存储卷的状态更改为可用状态;当出现纰漏或者错误时,生成错误报告,并重新生成存储卷。
在本实施例中,当检测到与所述卷内容对应的PV创建完成时,将所述存储卷的状态更改为创建检查态;基于处于创建检查态的所述存储卷,对所述持久化卷目录、PVC、PV、以及PVC与PV的关联关 系进行查询检查;当检测到所述持久化卷目录、PVC、PV存在且PVC与PV的关联关系符合所述卷属性信息中的PVC与PV的映射关系时,将所述存储卷的状态更改为可用状态。由于在持久化卷目录、PVC、PV创建完成后进行查询检查,因而有效防止了不能及时提示应用容器未成功持久化存储的现象。
在本公开的数据持久化处理方法的第一实施例的基础上,提供数据持久化处理方法的第四实施例。在第四实施例中,如图4所示,所述数据持久化处理方法在步骤S30之后还包括下述步骤:
在步骤S40中,当检测到对所述存储卷的卸载指令时,基于所述卸载指令依次卸载所述存储卷中的持久化卷目录、持久化卷的路径信息和卷内容。
在本实施例中,当用户需要卸载容器化应用的存储卷时,基于卸载指令获取虚拟容器管理平台(Kubernetes或OpenShift)的路径信息,以及根据该路径信息查询到目标存储卷,并依次卸载目标存储卷中的持久化卷目录、持久化卷的路径信息如PVC、PV和卷内容。
在本实施例中,当检测到对所述存储卷的卸载指令时,基于所述卸载指令依次卸载所述存储卷中的持久化卷目录、持久化卷的路径信息和卷内容。由于在创建存储卷后也能够有序卸载存储卷,并不需要用户手动获取存储器信息,因而提升了用户体验与信息安全性能。
在本公开的数据持久化处理方法的第一实施例的基础上,提供数据持久化处理方法的第五实施例。在第五实施例中,如图5所示,所述数据持久化处理方法在步骤S30之后还包括下述步骤:
在步骤S40中,当检测到对所述存储卷的修改指令时,基于所述修改指令删除所述存储卷中原有的持久化卷的路径信息,并建立新的持久化卷的路径信息;以及
在步骤S50中,基于所述修改指令,配额修改所述存储卷中的卷内容和持久化卷目录。
当检测到对存储卷的修改指令时,基于该修改指令删除存储卷中 原有的持久化卷的路径信息如原PVC和PV,并基于存储卷内容重新建立持久化卷的路径信息如新的PVC和PV。另外,当修改存储卷内容时,配额修改存储卷中的卷内容和持久化卷目录。配额修改即是容器化应用的修改内容在存储卷中作同步修改,若由于容器化应用内容的修改造成卷参数不同,则基于修改后的卷参数同步修改持久化卷目录。
在本实施例中,当检测到对所述存储卷的修改指令时,基于所述修改指令删除所述存储卷中原有的持久化卷的路径信息,并建立新的持久化卷的路径信息;基于所述修改指令,配额修改所述存储卷中的卷内容和持久化卷目录。由于修改时是自动进行的,并不需要用户手动修改,因而提升了用户体验。
在本公开的数据持久化处理方法的第一实施例的基础上,提供数据持久化处理方法的第六实施例。在第六实施例中,如图6所示,所述数据持久化处理方法在步骤S30之后还包括下述步骤:
在步骤S40中,当检测到对所述存储卷的查询指令时,基于所述查询指令从所述NAS类型服务器中获取所述存储卷的信息,并将所述存储卷的信息封装返回。
当检测到对所述存储卷的查询指令时,基于所述查询指令从所述NAS类型服务器中获取存储卷的信息,并将存储卷的信息封装返回,其中,当查询存储卷时,可直接从数据库中返回存储卷信息,将其封装成Json格式消息回复。
在本实施例中,当检测到对所述存储卷的查询指令时,基于所述查询指令从所述NAS类型服务器中获取存储卷的信息,并将存储卷的信息封装返回。因而能够快速查询存储卷的信息,提升用户体验。
在本公开的数据持久化处理方法的第一实施例的基础上,提供数据持久化处理方法的第七实施例。在第七实施例中,所述卷属性信息包括卷类型、卷命名空间、卷名称、卷容量的信息,所述NAS类型服务器包括网络文件系统(NFS)系统服务器、分布式存储(GlusterFS) 系统服务器和分布式存储(Ceph)系统服务器。
在本实施例中,由于NAS类型服务器包括网络文件系统(NFS)系统服务器、分布式存储(GlusterFS)系统服务器、分布式存储(Ceph)系统服务器等,因而能够基于卷属性信息准确地将容器化应用存储至相应存储器。
在本实施例中,由于卷属性信息包括卷类型、卷命名空间、卷名称、卷容量的信息,而且NAS类型服务器包括网络文件系统(NFS)系统服务器、分布式存储(GlusterFS)系统服务器和分布式存储(Ceph)系统服务器,因而能够实现基于卷属性信息准确地将容器化应用存储至相应存储器。
参照图8,图8是本公开的示例性数据持久化处理方法涉及的硬件运行环境的装置结构的示意图。
本公开的示例性数据持久化处理装置可以是个人计算机(PC),也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家组音频第3层)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家组音频第4层)播放器、便携计算机等终端设备。
如图8所示,该数据持久化处理装置可以包括:处理器1001例如CPU、存储器1005和通信总线1002。其中,通信总线1002配置为实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM(随机存取存储器),也可以是非易失性存储器(non-volatile memory)例如磁盘存储器。在一实施例中,存储器1005还可以是独立于前述处理器1001的存储装置。
在一实施例中,该数据持久化处理装置还可以包括用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),用户接口还可以包括标准的有线接口、无线接口。在一实施例中,网络接口可以包括标准的有线接口、无线接口(如WI-FI接口)。
本领域技术人员可以理解,图8中示出的数据持久化处理装置的结构并不构成对数据持久化处理装置的限制,还可以包括比图示更多或更少的部件,或者组合某些部件,或者以不同的部件布置。
如图8所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块以及数据持久化处理程序。操作系统是管理和控制数据持久化处理装置的硬件和软件资源的程序,其支持数据持久化处理程序以及其它软件和/或程序的运行。网络通信模块实现存储器1005内部的各组件之间的通信以及内部各组件与数据持久化处理装置中其它硬件和软件之间的通信。
在图8所示的数据持久化处理装置中,处理器1001配置为执行存储在存储器1005中的数据持久化处理程序以实施以下步骤:当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信息与卷内容;基于所述卷属性信息,在相应网络接入式存储(NAS)类型服务器中创建存储卷,并在该存储卷中存储所述卷内容;以及基于所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息。
在一实施例中,所述持久化卷的所述路径信息包括持久化卷声明(PVC)和持久化卷(PV),所述在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤包括下述步骤:当检测到所述存储卷完成了所述卷内容的存储时,将所述存储卷的状态记录为创建初始态;基于处于创建初始态的所述存储卷与所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的所述持久化卷目录,并将所述存储卷的状态更改为创建PVC态;基于处于创建PVC态的所述存储卷与所述卷属性信息,在所述虚拟容器管理平台上创建与所述卷内容对应的PVC,并将所述存储卷的状态更改为创建PV态;以及基于处于创建PV态的所述存储卷,并基于所述卷属性信息中的PVC与PV的映射关系,在所述虚拟容器管理平台上创建与所述卷内容对应的PV。
在一实施例中,在所述在所述虚拟容器管理平台上创建与所述卷 内容对应的PV的步骤之后,所述在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤还包括下述步骤:当检测到与所述卷内容对应的PV创建完成时,将所述存储卷的状态更改为创建检查态;基于处于创建检查态的所述存储卷,对所述持久化卷目录、PVC、PV、以及PVC与PV的关联关系进行查询检查;以及当检测到所述持久化卷目录、PVC、PV存在且PVC与PV的关联关系符合所述卷属性信息中的PVC与PV的映射关系时,将所述存储卷的状态更改为可用状态。
在一实施例中,在所述在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤之后,所述数据持久化处理方法还包括下述步骤:当检测到对所述存储卷的卸载指令时,基于所述卸载指令依次卸载所述存储卷中的持久化卷目录、持久化卷的路径信息和卷内容。
在一实施例中,在所述在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤之后,所述数据持久化处理方法还包括下述步骤:当检测到对所述存储卷的修改指令时,基于所述修改指令删除所述存储卷中原有的持久化卷的路径信息,并建立新的持久化卷的路径信息;以及基于所述修改指令,配额修改所述存储卷中的卷内容和持久化卷目录。
在一实施例中,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录、并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤之后,所述数据持久化处理方法还包括下述步骤:当检测到对所述存储卷的查询指令时,基于所述查询指令从所述NAS类型服务器中获取所述存储卷的信息,并将所述存储卷的信息封装返回。
在一实施例中,所述卷属性信息包括卷类型、卷命名空间、卷名称、卷容量的信息,所述NAS类型服务器包括网络文件系统(NFS)系统服务器、分布式存储(GlusterFS)系统服务器和分布式存储(Ceph)系统服务器。
本公开的数据持久化处理装置的实施方式与上述数据持久化处理 方法的各实施例基本相同,在此不再赘述。
此外,为实现上述目的,本公开还提供一种数据持久化处理系统,所述数据持久化处理系统包括虚拟容器管理平台、系统服务器、以及实施上述数据持久化处理方法的数据持久化处理装置。
本公开的数据持久化处理系统的实施方式与上述数据持久化处理方法的各实施例基本相同,在此不再赘述。
本公开还提供了一种可读存储介质,所述可读存储介质存储有一个或者更多的程序,所述一个或者更多的程序可被一个或者更多的处理器执行以实施上述任一项所述的数据持久化处理方法的步骤。
本公开的可读存储介质的实施方式与上述数据持久化处理方法的各实施例基本相同,在此不再赘述。
以上仅为本公开的优选实施例,并非因此限制本公开的专利范围,凡是利用本公开的说明书及附图的内容所作的等效结构或等效流程变换,无论直接或间接运用在其他相关的技术领域,均同理包括在本公开的专利范围内。

Claims (10)

  1. 一种对数据持久化处理方法,其中,所述数据包括挂载在虚拟容器管理平台上的容器化应用,所述数据持久化处理方法包括下述步骤:
    当检测到对容器化应用的持久化处理指令时,基于该持久化处理指令获取所述容器化应用的卷属性信息与卷内容;
    基于所述卷属性信息,在网络接入式存储NAS类型服务器中创建存储卷,并在该存储卷中存储所述卷内容;以及
    基于所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录并在所述虚拟容器管理平台上创建持久化卷的路径信息。
  2. 如权利要求1所述的数据持久化处理方法,其中,所述持久化卷的所述路径信息包括持久化卷声明PVC和持久化卷PV,并且
    所述在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤包括下述子步骤:
    当检测到所述存储卷完成了所述卷内容的存储时,将所述存储卷的状态记录为创建初始态;
    基于处于创建初始态的所述存储卷与所述卷属性信息,在所述NAS类型服务器中创建与所述卷内容对应的所述持久化卷目录,并将所述存储卷的状态更改为创建PVC态;
    基于处于创建PVC态的所述存储卷与所述卷属性信息,在所述虚拟容器管理平台上创建与所述卷内容对应的PVC,并将所述存储卷的状态更改为创建PV态;以及
    基于处于创建PV态的所述存储卷,并基于所述卷属性信息中的PVC与PV的映射关系,在所述虚拟容器管理平台上创建与所述卷内容对应的PV。
  3. 如权利要求2所述的数据持久化处理方法,其中,所述在所述虚拟容器管理平台上创建与所述卷内容对应的PV的步骤之后,所述在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤还包括下述子步骤:
    当检测到与所述卷内容对应的PV创建完成时,将所述存储卷的状态更改为创建检查态;
    基于处于创建检查态的所述存储卷,对所述持久化卷目录、PVC、PV、以及PVC与PV的关联关系进行查询检查;以及
    当检测到所述持久化卷目录、PVC、PV存在且PVC与PV的关联关系符合所述卷属性信息中的PVC与PV的映射关系时,将所述存储卷的状态更改为可用状态。
  4. 如权利要求1所述的数据持久化处理方法,其中,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤之后,所述数据持久化处理方法还包括下述步骤:
    当检测到对所述存储卷的卸载指令时,基于所述卸载指令依次卸载所述存储卷中的持久化卷目录、持久化卷的路径信息和卷内容。
  5. 如权利要求1所述的数据持久化处理方法,其中,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤之后,所述数据持久化处理方法还包括下述步骤:
    当检测到对所述存储卷的修改指令时,基于所述修改指令删除所述存储卷中原有的持久化卷的路径信息,并建立新的持久化卷的路径信息;以及
    基于所述修改指令,配额修改所述存储卷中的卷内容和持久化卷目录。
  6. 如权利要求1所述的数据持久化处理方法,其中,在所述NAS类型服务器中创建与所述卷内容对应的持久化卷目录并在所述虚拟容器管理平台上创建持久化卷的路径信息的步骤之后,所述数据持久化处理方法还包括下述步骤:
    当检测到对所述存储卷的查询指令时,基于所述查询指令从所述NAS类型服务器中获取所述存储卷的信息,并将所述存储卷的信息封装返回。
  7. 如权利要求1所述的数据持久化处理方法,其中,所述卷属性信息包括卷类型、卷命名空间、卷名称、卷容量的信息,并且
    所述NAS类型服务器包括网络文件系统NFS系统服务器、分布式存储GlusterFS系统服务器和分布式存储Ceph系统服务器。
  8. 一种数据持久化处理装置,其中,所述数据持久化处理装置包括:存储器、处理器,通信总线以及存储在所述存储器中的数据持久化处理程序,
    所述通信总线配置为实现所述处理器与所述存储器之间的通信连接,并且
    所述处理器配置为执行所述数据持久化处理程序,以实施如权利要求1至7中任一项所述的数据持久化处理方法的步骤。
  9. 一种数据持久化处理系统,其中,所述数据持久化处理系统包括虚拟容器管理平台、系统服务器以及如权利要求8所述的数据持久化处理装置。
  10. 一种可读存储介质,其中,在所述可读存储介质中存储有数据持久化处理程序,所述数据持久化处理程序被处理器执行以实施如权利要求1-7中任一项所述的数据持久化处理方法的步骤。
PCT/CN2018/073956 2017-07-20 2018-01-24 数据持久化处理的方法、装置、系统及可读存储介质 WO2019015288A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP18834444.4A EP3657358B1 (en) 2017-07-20 2018-01-24 Method, device and system for persistent data processing, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710596099.X 2017-07-20
CN201710596099.XA CN110019081B (zh) 2017-07-20 2017-07-20 数据持久化处理方法、装置、系统及可读存储介质

Publications (1)

Publication Number Publication Date
WO2019015288A1 true WO2019015288A1 (zh) 2019-01-24

Family

ID=65015298

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073956 WO2019015288A1 (zh) 2017-07-20 2018-01-24 数据持久化处理的方法、装置、系统及可读存储介质

Country Status (3)

Country Link
EP (1) EP3657358B1 (zh)
CN (1) CN110019081B (zh)
WO (1) WO2019015288A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286629A (zh) * 2020-10-20 2021-01-29 北京大米科技有限公司 一种数据处理方法、装置、存储介质及电子设备
CN112328170A (zh) * 2020-10-22 2021-02-05 杭州朗澈科技有限公司 一种云硬盘的扩容方法、装置、计算机设备和存储介质
CN112667147A (zh) * 2019-10-15 2021-04-16 慧与发展有限责任合伙企业 用于容器化的应用的虚拟持久卷
CN113590536A (zh) * 2021-05-20 2021-11-02 济南浪潮数据技术有限公司 一种数据存储方法、系统、电子设备及存储介质
CN114064594A (zh) * 2021-11-22 2022-02-18 马上消费金融股份有限公司 数据处理方法和装置
CN114489512A (zh) * 2022-02-10 2022-05-13 京东科技信息技术有限公司 限定容器容量的方法及装置、电子设备、存储介质
CN115017117A (zh) * 2022-08-05 2022-09-06 浩鲸云计算科技股份有限公司 一种基于本地盘的容器文件系统在线扩容的方法和系统

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941393A (zh) * 2019-10-31 2020-03-31 北京浪潮数据技术有限公司 一种基于逻辑卷管理的lv供应方法、装置、设备及介质
CN110971665A (zh) * 2019-10-31 2020-04-07 北京浪潮数据技术有限公司 一种对接多类型存储的管理方法、系统、设备及存储介质
CN110851082B (zh) * 2019-11-08 2023-09-19 浪潮云信息技术股份公司 一种容器对接光纤网络存储的方法
CN111026499B (zh) * 2019-11-13 2021-09-17 广州文远知行科技有限公司 容器处理方法、装置、计算机设备和存储介质
CN111104368B (zh) * 2019-12-16 2023-08-22 浪潮云信息技术股份公司 一种实现容器存储扩容的方法及系统
CN113110796A (zh) * 2020-01-13 2021-07-13 顺丰科技有限公司 数据管理方法、装置、服务器及存储介质
CN111367503A (zh) * 2020-03-24 2020-07-03 中国建设银行股份有限公司 多元存储的管理方法、装置、设备及存储介质
US11687267B2 (en) * 2020-04-14 2023-06-27 Hewlett Packard Enterprise Development Lp Containerized application manifests and virtual persistent volumes
CN111767118A (zh) * 2020-06-24 2020-10-13 中国工商银行股份有限公司 基于分布式文件系统的容器存储空间处理方法及装置
CN113741796B (zh) * 2020-07-16 2024-04-16 北京沃东天骏信息技术有限公司 一种终端应用的数据持久化方法和装置
CN111913665B (zh) * 2020-07-30 2023-11-24 北京星辰天合科技股份有限公司 存储卷的挂载方法及装置、电子设备
US11960773B2 (en) 2020-07-31 2024-04-16 Hewlett Packard Enterprise Development Lp Modifying virtual persistent volumes based on analysis of performance metrics
CN111966305B (zh) * 2020-10-22 2021-02-09 腾讯科技(深圳)有限公司 持久卷分配方法、装置、计算机设备和存储介质
CN113391764A (zh) * 2021-06-09 2021-09-14 北京沃东天骏信息技术有限公司 一种信息处理方法及装置、存储介质
CN115391238B (zh) * 2022-10-31 2023-03-14 深圳万物安全科技有限公司 持久卷的静态制备方法、装置、终端设备与介质
CN117056150B (zh) * 2023-10-10 2024-01-26 宁波银行股份有限公司 一种网络附属存储检测方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598789A (zh) * 2016-11-30 2017-04-26 成都华为技术有限公司 容器服务容灾的方法、装置、生产站点和灾备站点
US9678683B1 (en) * 2016-11-01 2017-06-13 Red Hat, Inc. Lazy persistent storage volume provisioning
CN106874357A (zh) * 2016-12-28 2017-06-20 新华三技术有限公司 一种Web应用的资源定制方法和装置
CN107193504A (zh) * 2017-06-02 2017-09-22 郑州云海信息技术有限公司 一种基于Kubernetes的自动化分配和创建应用存储的方法和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941316B2 (en) * 2003-10-23 2005-09-06 Microsoft Corporation System and method for object persistence in a database store
US7698289B2 (en) * 2003-12-02 2010-04-13 Netapp, Inc. Storage system architecture for striping data container content across volumes of a cluster
CN102231116A (zh) * 2011-07-04 2011-11-02 成都市华为赛门铁克科技有限公司 应用程序虚拟化安装及加载方法及装置
CN103118073B (zh) * 2013-01-08 2015-07-22 华中科技大学 一种云环境下虚拟机数据持久化存储系统和方法
CN105808312B (zh) * 2014-12-30 2019-08-06 华为技术有限公司 一种供给虚拟卷的方法和设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9678683B1 (en) * 2016-11-01 2017-06-13 Red Hat, Inc. Lazy persistent storage volume provisioning
CN106598789A (zh) * 2016-11-30 2017-04-26 成都华为技术有限公司 容器服务容灾的方法、装置、生产站点和灾备站点
CN106874357A (zh) * 2016-12-28 2017-06-20 新华三技术有限公司 一种Web应用的资源定制方法和装置
CN107193504A (zh) * 2017-06-02 2017-09-22 郑州云海信息技术有限公司 一种基于Kubernetes的自动化分配和创建应用存储的方法和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3657358A4 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667147A (zh) * 2019-10-15 2021-04-16 慧与发展有限责任合伙企业 用于容器化的应用的虚拟持久卷
CN112667147B (zh) * 2019-10-15 2023-05-30 慧与发展有限责任合伙企业 用于容器化的应用的虚拟持久卷
CN112286629A (zh) * 2020-10-20 2021-01-29 北京大米科技有限公司 一种数据处理方法、装置、存储介质及电子设备
CN112328170A (zh) * 2020-10-22 2021-02-05 杭州朗澈科技有限公司 一种云硬盘的扩容方法、装置、计算机设备和存储介质
CN112328170B (zh) * 2020-10-22 2022-05-24 杭州朗澈科技有限公司 一种云硬盘的扩容方法、装置、计算机设备和存储介质
CN113590536A (zh) * 2021-05-20 2021-11-02 济南浪潮数据技术有限公司 一种数据存储方法、系统、电子设备及存储介质
CN113590536B (zh) * 2021-05-20 2023-12-29 济南浪潮数据技术有限公司 一种数据存储方法、系统、电子设备及存储介质
CN114064594A (zh) * 2021-11-22 2022-02-18 马上消费金融股份有限公司 数据处理方法和装置
CN114064594B (zh) * 2021-11-22 2023-09-22 马上消费金融股份有限公司 数据处理方法和装置
CN114489512A (zh) * 2022-02-10 2022-05-13 京东科技信息技术有限公司 限定容器容量的方法及装置、电子设备、存储介质
CN115017117A (zh) * 2022-08-05 2022-09-06 浩鲸云计算科技股份有限公司 一种基于本地盘的容器文件系统在线扩容的方法和系统

Also Published As

Publication number Publication date
EP3657358B1 (en) 2024-01-17
CN110019081B (zh) 2023-04-07
EP3657358A1 (en) 2020-05-27
CN110019081A (zh) 2019-07-16
EP3657358A4 (en) 2021-05-26

Similar Documents

Publication Publication Date Title
WO2019015288A1 (zh) 数据持久化处理的方法、装置、系统及可读存储介质
US10599457B2 (en) Importing and exporting virtual disk images
CN108513657B (zh) 数据转换方法及备份服务器
WO2018090290A1 (zh) 镜像文件转换方法及装置
US11249788B2 (en) Cloud management platform, and virtual machine management method and system
TW201721411A (zh) 應用程式的處理方法和裝置
US20130227085A1 (en) Terminal and method for using cloud services
US20190079791A1 (en) Data Storage Method and Apparatus
CN110688174A (zh) 容器启动方法、存储介质和电子设备
US20170075674A1 (en) Techniques for creating a bootable image in a cloud-based computing environment
CN106648838B (zh) 一种资源池管理的配置方法及装置
US11882154B2 (en) Template representation of security resources
US11263297B2 (en) Dynamic insertion of variablized secrets in a pipeline integration system
CN105472015A (zh) 云平台接入第三方应用的方法和装置
US20140297953A1 (en) Removable Storage Device Identity and Configuration Information
US10637915B1 (en) Storage services configured for storage-oriented applications
TW202232318A (zh) 超載開機錯誤訊號機制以啟用將被執行的錯誤減輕行動
CN107453950A (zh) 一种信息处理方法及监控系统
US10958730B2 (en) Mapping virtual network functions
CN105045629A (zh) 一种无盘工作站设备启动方法及系统
CN110198266B (zh) 实时数据流处理方法及系统
US11797358B2 (en) Method and system for performing application programming interface calls between heterogeneous applications and cloud service providers
US11385905B2 (en) Managing boot device orders for computing devices
US9501528B2 (en) Efficient response of common information model (CIM) server
CN116301934A (zh) 软件安装方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018834444

Country of ref document: EP

Effective date: 20200220