CN111767118A - Container storage space processing method and device based on distributed file system - Google Patents

Container storage space processing method and device based on distributed file system Download PDF

Info

Publication number
CN111767118A
CN111767118A CN202010585058.2A CN202010585058A CN111767118A CN 111767118 A CN111767118 A CN 111767118A CN 202010585058 A CN202010585058 A CN 202010585058A CN 111767118 A CN111767118 A CN 111767118A
Authority
CN
China
Prior art keywords
container
storage space
creation request
file system
distributed file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010585058.2A
Other languages
Chinese (zh)
Other versions
CN111767118B (en
Inventor
沈一帆
白佳乐
沈震宇
王启宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010585058.2A priority Critical patent/CN111767118B/en
Publication of CN111767118A publication Critical patent/CN111767118A/en
Application granted granted Critical
Publication of CN111767118B publication Critical patent/CN111767118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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
    • 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
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a container storage space processing method and device based on a distributed file system, wherein the method comprises the following steps: receiving a container creation request sent by a user, and generating a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request; creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space; the storage space of the container can be flexibly configured according to the user requirement, and the operation and maintenance efficiency of the container is improved.

Description

Container storage space processing method and device based on distributed file system
Technical Field
The application relates to the technical field of computers, in particular to a container storage space processing method and device based on a distributed file system.
Background
In the field of cloud computing, the container itself provides the user with its own root directory storage as a temporary file system for use as temporary files generated within the storage container. However, the life cycle of these files is finally destroyed along with the end of the container, and cannot be stored persistently. With the continuous maturity and large-scale popularization and use of container technology, users have more and more demands for large-scale persistent storage in addition to temporary storage required by containers.
At present, for a scheme for providing persistent storage for a container, in the prior art, a host where the container is located mainly provides a file system for the container locally and mounts the file system to the inside of the container, but the scheme is limited by the size of the local file system, and the size of the file system cannot be specified by a container user, which often cannot meet the requirements of the user.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a container storage space processing method and device based on a distributed file system, which can flexibly configure the storage space of a container according to the user requirement and improve the operation and maintenance efficiency aiming at the container.
In order to solve at least one of the above problems, the present application provides the following technical solutions:
in a first aspect, the present application provides a container storage space processing method based on a distributed file system, including:
receiving a container creation request sent by a user, and generating a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request;
and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space.
Further, the generating a corresponding storage space creation request according to the container creation request to enable a preset distributed file system to create a corresponding storage space according to the storage space creation request includes:
and generating a corresponding storage space creation request according to the storage space requirement information and the container characteristic information in the container creation request, so that a preset distributed file system determines the size and the type of the storage space according to the storage space creation request, and generates a corresponding storage space according to the size and the type of the storage space.
Further, the creating a corresponding container according to the container creating request and creating a mapping relationship between the container and the storage space includes:
and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space according to the container characteristic information of the container and the storage space characteristic information of the storage space.
Further, the establishing a mapping relationship between the container and the storage space according to the characteristic information of the container and the characteristic information of the storage space includes:
according to the IP address of the host machine of the container and the storage access IP address of the storage space, mounting the storage space to the local host machine of the container;
and establishing a mapping relation between the storage space and the container according to the storage identifier of the storage space and the container identifier of the container.
In a second aspect, the present application provides a container storage space processing apparatus based on a distributed file system, including:
the request module is used for receiving a container creation request sent by a user and generating a corresponding storage space creation request according to the container creation request so as to enable a preset distributed file system to create a corresponding storage space according to the storage space creation request;
and the mounting module is used for creating a corresponding container according to the container creation request and establishing a mapping relation between the container and the storage space.
Further, the request module includes:
and the linkage creation request determining unit is used for generating a corresponding storage space creation request according to the storage space requirement information and the container characteristic information in the container creation request, so that a preset distributed file system determines the size and the type of the storage space according to the storage space creation request, and generates a corresponding storage space according to the size and the type of the storage space.
Further, the mounting module includes:
and the characteristic mapping unit is used for creating a corresponding container according to the container creation request and establishing a mapping relation between the container and the storage space according to the container characteristic information of the container and the storage space characteristic information of the storage space.
Further, the feature mapping unit includes:
the dynamic mounting subunit is used for mounting the storage space to the host of the container according to the host IP address of the container and the storage access IP address of the storage space;
and the internal mapping subunit is used for establishing the mapping relation between the storage space and the container according to the storage identifier of the storage space and the container identifier of the container.
In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the distributed file system based container storage space processing method when executing the program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the distributed file system based container storage processing method.
According to the technical scheme, the persistent storage space used for the container is created through the distributed file system, the container persistent storage requirement of a user is met, the storage space creation request can be automatically generated according to the container creation request sent by the user, so that the corresponding storage space is created through the preset distributed file system, the mismatching and resource waste of the storage space are avoided, the mapping relation between the container and the storage space can be accurately and flexibly established, the operation and maintenance efficiency is improved, and the labor cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a distributed file system based container storage space processing method according to an embodiment of the present application;
FIG. 2 is a second flowchart illustrating a distributed file system based container storage space processing method according to an embodiment of the present application;
FIG. 3 is a block diagram of a distributed file system based container storage space processing apparatus according to an embodiment of the present application;
FIG. 4 is a second block diagram of a container storage space processing apparatus based on a distributed file system according to an embodiment of the present application;
FIG. 5 is a third block diagram of a container storage space processing apparatus based on a distributed file system according to an embodiment of the present application;
FIG. 6 is a fourth block diagram of a container storage space processing apparatus based on a distributed file system according to an embodiment of the present application;
FIG. 7 is a logic flow diagram of a distributed file system based container storage space processing method in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In consideration of the problems that in the prior art, a host where a container is located mainly provides a file system for the container locally and mounts the file system into the container, but the scheme is limited by the size of a local file system, the size of the file system cannot be specified by a container user, and the requirements of the user cannot be met, the application provides a container storage space processing method and device based on a distributed file system The labor cost is reduced.
In order to flexibly configure the storage space of a container according to the user requirement and improve the operation and maintenance efficiency for the container, the present application provides an embodiment of a container storage space processing method based on a distributed file system, and referring to fig. 1, the container storage space processing method based on the distributed file system specifically includes the following contents:
step S101: receiving a container creation request sent by a user, and generating a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request.
It can be understood that the preset distributed file system may be an existing distributed file system, and the corresponding storage space may be created according to the received storage space creation request.
Optionally, when a container creation request sent by a user is received, another corresponding storage space creation request may be generated according to various information in the container creation request, and the storage space creation request is sent to a preset distributed file system, so that the distributed file system can create a storage space (for example, a storage volume including at least one storage block) according to the storage space creation request.
Step S102: and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space.
Optionally, after the container is created according to the container creation request, the application establishes a mapping relationship between the container and a storage space created by the preset distributed file system, so that the container has a persistent storage capability.
Optionally, the method may further include setting a cache unit and a monitoring unit, where the cache unit is configured to receive the message information sent back after the container is successfully created and the storage space is successfully created, and the monitoring unit is configured to trigger the mapping operation between the container and the storage space after monitoring that the cache unit includes two corresponding message information.
Optionally, the mapping operation may specifically be to mount a storage space (e.g., a storage volume) created by the distributed file system to a local host where the created container is located, and after the mounting operation is completed, map the storage space to the container according to characteristic information (e.g., identification information, that is, a name) of the container and the storage space, so as to finally implement dynamic mounting.
As can be seen from the above description, the container storage space processing method based on the distributed file system according to the embodiment of the present application can create a persistent storage space for a container to use through the distributed file system, so as to meet a container persistent storage requirement of a user, and can automatically generate a storage space creation request according to a container creation request sent by the user, so that a preset distributed file system creates a corresponding storage space, thereby avoiding mismatching and resource waste of the storage space, and can accurately and flexibly establish a mapping relationship between the container and the storage space, thereby improving operation and maintenance efficiency and reducing labor cost.
In order to adaptively create a storage space that can persist accurately when a user creates a container, in an embodiment of the container storage space processing method based on a distributed file system according to the present application, the step S101 may further specifically include the following:
and generating a corresponding storage space creation request according to the storage space requirement information and the container characteristic information in the container creation request, so that a preset distributed file system determines the size and the type of the storage space according to the storage space creation request, and generates a corresponding storage space according to the size and the type of the storage space.
Optionally, the container creation request sent by the user may include storage space requirement information (i.e., how much space is needed for storage) and container characteristic information (i.e., characteristics of the container to be created, such as a container type and a container use), so as to generate a corresponding storage space creation request according to a predefined correspondence rule, for example, generate a storage space creation request with a storage space size of 1GB and a storage space type of high-speed storage, and send the storage space creation request to a preset distributed file system, so that the distributed file system can create a storage space (e.g., a storage volume including at least one storage block) according to the storage space creation request.
In order to accurately establish a mapping relationship between a container and a storage space in the distributed file system, in an embodiment of the method for processing a container storage space based on the distributed file system, the step S102 may further include the following steps:
and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space according to the container characteristic information of the container and the storage space characteristic information of the storage space.
Optionally, the container characteristic information and the storage space characteristic information include, but are not limited to: IP address and name identification.
In order to accurately establish a mapping relationship between a container and a storage space in a distributed file system, in an embodiment of the method for processing a container storage space based on a distributed file system, referring to fig. 2, the following may be further specifically included:
step S201: and mounting the storage space to the local host of the container according to the IP address of the host of the container and the storage access IP address of the storage space.
Step S202: and establishing a mapping relation between the storage space and the container according to the storage identifier of the storage space and the container identifier of the container.
Alternatively, the storage space (e.g., a storage volume) created by the distributed file system may be mounted to a local host where the created container is located, and after the mounting operation is completed, the storage space is mapped to the container according to the container and the characteristic information (e.g., identification information, i.e., name) of the storage space itself, so as to finally implement dynamic mounting.
Specifically, an association relationship may be established according to the IP address of the host of the container and the storage access IP address of the storage space, so as to mount the storage space to the host of the container locally, and after the mounting operation is completed, the storage space is mapped to the container according to the name identifiers of the container and the storage space, so as to finally implement dynamic mounting.
In order to flexibly configure the storage space of the container according to the user requirement and improve the operation and maintenance efficiency for the container, the present application provides an embodiment of a distributed file system based container storage space processing apparatus for implementing all or part of the content of the distributed file system based container storage space processing method, and referring to fig. 3, the distributed file system based container storage space processing apparatus specifically includes the following contents:
the request module 10 is configured to receive a container creation request sent by a user, and generate a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request.
And the mounting module 20 is configured to create a corresponding container according to the container creation request, and establish a mapping relationship between the container and the storage space.
As can be seen from the above description, the container storage space processing apparatus based on a distributed file system according to the embodiments of the present application can create a persistent storage space for a container to use through the distributed file system, so as to meet a container persistent storage requirement of a user, and can automatically generate a storage space creation request according to a container creation request sent by the user, so that a preset distributed file system creates a corresponding storage space, thereby avoiding mismatching and resource waste of the storage space, and can accurately and flexibly establish a mapping relationship between the container and the storage space, thereby improving operation and maintenance efficiency and reducing labor cost.
In order to adaptively create a storage space that can persist accurately when a user creates a container, in an embodiment of the distributed file system based container storage space processing apparatus of the present application, referring to fig. 4, the request module 10 includes:
the linkage creation request determining unit 11 is configured to generate a corresponding storage space creation request according to the storage space requirement information and the container characteristic information in the container creation request, so that the preset distributed file system determines the size and the type of the storage space according to the storage space creation request, and generates a corresponding storage space according to the size and the type of the storage space.
In order to accurately establish a mapping relationship between a container and a storage space in a distributed file system, in an embodiment of the container storage space processing apparatus based on a distributed file system according to the present application, referring to fig. 5, the mount module 20 includes:
a feature mapping unit 21, configured to create a corresponding container according to the container creation request, and establish a mapping relationship between the container and the storage space according to the container feature information of the container and the storage space feature information of the storage space.
In order to accurately establish a mapping relationship between a container and a storage space in a distributed file system, in an embodiment of the container storage space processing apparatus based on a distributed file system according to the present application, referring to fig. 6, the feature mapping unit 21 includes:
and the dynamic mount sub-unit 211 is configured to mount the storage space to the host local of the container according to the host IP address of the container and the storage access IP address of the storage space.
And an internal mapping subunit 212, configured to establish a mapping relationship between the storage space and the container according to the storage identifier of the storage space and the container identifier of the container.
To further illustrate the present solution, the present application further provides a specific application example of implementing the container storage space processing method based on the distributed file system by using the container storage space processing apparatus based on the distributed file system, and refer to fig. 7, which specifically includes the following contents:
1. request transmission device
The method mainly takes charge of respectively sending container creation requests to a container creation device and a distributed file storage creation device, receiving returned information, caching the returned information to a local cache unit for a container storage monitoring unit to discover, and specifically comprises the following steps:
1) and the container creation request sending unit is used for sending a container creation request, receiving a return message from the container creation device and caching the result into a local result caching unit.
For example, the sent message is {1.CPU memory size }, the returned message is {1.FLAG: success or failure, 2. container address: container name + host IP }.
2) And the storage creation request sending unit is used for sending a storage creation request, receiving a return message from the distributed file storage creation device and caching the result into a local result caching unit.
For example, the sending message is {1. storage size, 2. file system format }, the returning message is {1.FLAG: success or failure, 2. storage volume address: storage access IP + storage volume name }.
3) And the local cache unit caches and updates the container creation and stores the created return message for the container storage monitoring unit to discover.
For example, the format of the cached data is {1. request ID, 2. container creation success FLAG, 3. storage creation success FLAG, 4. container name + host IP, 4. storage volume address: and storing the access IP + the name of the storage volume, and 5 mounting success FLAG }.
2. Storage creation apparatus
The method mainly receives a storage creation request of a request transceiver unit, creates a storage volume in compliance with a request size and a file system format in a distributed storage cluster, and returns a message of whether creation is successful or not to a request transceiver, and specifically includes:
1) and the request receiving unit receives the storage establishing request from the request sending device, transmits the storage establishing request to the storage establishing unit to establish corresponding storage, and finally returns a message to the request sending device.
2) And the storage creating unit is used for creating corresponding storage for the container.
3) And the distributed storage cluster receives the storage requirement of the storage creating unit and provides a storage volume for a user to use.
3. Container creation apparatus
The method mainly receives a container creation request of a request transceiver unit, creates a container complying with a request resource in a host, and returns a message indicating whether creation is successful or not to a request transceiver device, and specifically includes:
1) the request receiving unit receives the container creating request from the request sending device, transfers the container creating request to the container creating unit to create a corresponding container, and finally returns the message to the request sending device.
2) And the container creating unit is used for creating a corresponding container for a user.
4. Dynamic mounting device
The method mainly takes charge of monitoring a local cache unit of a request sending device, realizing discovery of created containers and storage thereof, mounting the storage to a host locally according to a corresponding relation of the containers, and finally mapping the storage into the containers, and specifically comprises the following steps:
1) and the monitoring unit monitors the local cache unit in real time, and transmits the corresponding storage address and the container address to the mounting unit once finding that the container creation requested at a certain time and the corresponding storage creation are successful.
2) And the mounting unit is used for mounting the storage volume of the distributed file system to the local host where the container is located.
3) And the storage mapping unit is used for mapping the storage into the container according to the name of the container when the local mounting of the distributed storage volume on the host is successful, finally realizing dynamic mounting, and returning a message whether the storage is successful or not to the request sending device.
As can be seen from the above description, the present application can also achieve at least the following technical effects:
1. the remote file system mounting is carried out on the host, the data storage and the distributed storage cluster are different from a temporary file system, the persistent storage capacity is realized, and a certain high availability capacity is provided according to the disaster tolerance capacity of the distributed storage cluster.
2. The storage device can create a corresponding storage volume in real time according to the storage capacity required by a user for the user to use, and avoids storage waste possibly caused by the fact that a large storage volume is built in advance by a traditional method.
3. The storage that can automatically with the user demand is dynamically mounted and is mapped to inside the container, and need not fortune dimension personnel manual application storage to inside the container of mounting when the container is established, promoted fortune dimension efficiency and cost of labor greatly, had real-time, efficient characteristics.
In terms of hardware, in order to flexibly configure a storage space of a container according to a user requirement and improve operation and maintenance efficiency for the container, the present application provides an embodiment of an electronic device for implementing all or part of contents in the container storage space processing method based on a distributed file system, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the communication interface is used for realizing information transmission between the container storage space processing device based on the distributed file system and relevant equipment such as a core service system, a user terminal, a relevant database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the logic controller may refer to an embodiment of the container storage space processing method based on the distributed file system and an embodiment of the container storage space processing apparatus based on the distributed file system in the embodiments for implementation, and the contents thereof are incorporated herein, and repeated details are not repeated.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), an in-vehicle device, a smart wearable device, and the like. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the container storage space processing method based on the distributed file system may be executed on the electronic device side as described in the above, or all operations may be completed in the client device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be communicatively connected to a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, the server may also include a server on an intermediate platform, for example, a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
Fig. 8 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 8, the electronic device 9600 can include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this FIG. 8 is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the distributed file system based container storage space handling method functions may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows:
step S101: receiving a container creation request sent by a user, and generating a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request.
Step S102: and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space.
As can be seen from the above description, according to the electronic device provided in the embodiment of the present application, the persistent storage space used for the container is created through the distributed file system, so as to meet the container persistent storage requirement of the user, and the storage space creation request can be automatically generated according to the container creation request sent by the user, so that the preset distributed file system creates the corresponding storage space, thereby avoiding the discomfortable allocation and resource waste of the storage space, and the mapping relationship between the container and the storage space can be accurately and flexibly established, thereby improving the operation and maintenance efficiency and reducing the labor cost.
In another embodiment, the container storage space processing apparatus based on the distributed file system may be configured separately from the central processor 9100, for example, the container storage space processing apparatus based on the distributed file system may be configured as a chip connected to the central processor 9100, and the functions of the container storage space processing method based on the distributed file system may be implemented by the control of the central processor.
As shown in fig. 8, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 also does not necessarily include all of the components shown in fig. 8; further, the electronic device 9600 may further include components not shown in fig. 8, which may be referred to in the art.
As shown in fig. 8, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. Memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all steps in the distributed file system based container storage space processing method with an execution subject being a server or a client in the foregoing embodiments, where the computer-readable storage medium stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements all steps of the distributed file system based container storage space processing method with an execution subject being a server or a client in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
step S101: receiving a container creation request sent by a user, and generating a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request.
Step S102: and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space.
As can be seen from the above description, in the computer-readable storage medium provided in the embodiment of the present application, the persistent storage space used for the container is created by the distributed file system, so as to meet the container persistent storage requirement of the user, and the storage space creation request can be automatically generated according to the container creation request sent by the user, so that the preset distributed file system creates the corresponding storage space, thereby avoiding the non-matching and resource waste of the storage space, and the mapping relationship between the container and the storage space can be accurately and flexibly established, thereby improving the operation and maintenance efficiency and reducing the labor cost.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A container storage space processing method based on a distributed file system is characterized by comprising the following steps:
receiving a container creation request sent by a user, and generating a corresponding storage space creation request according to the container creation request, so that a preset distributed file system creates a corresponding storage space according to the storage space creation request;
and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space.
2. The method for processing the container storage space based on the distributed file system according to claim 1, wherein the generating a corresponding storage space creation request according to the container creation request so that a preset distributed file system creates a corresponding storage space according to the storage space creation request includes:
and generating a corresponding storage space creation request according to the storage space requirement information and the container characteristic information in the container creation request, so that a preset distributed file system determines the size and the type of the storage space according to the storage space creation request, and generates a corresponding storage space according to the size and the type of the storage space.
3. The method for processing the container storage space based on the distributed file system according to claim 1, wherein the creating a corresponding container according to the container creation request and establishing a mapping relationship between the container and the storage space includes:
and creating a corresponding container according to the container creation request, and establishing a mapping relation between the container and the storage space according to the container characteristic information of the container and the storage space characteristic information of the storage space.
4. The method for processing the container storage space based on the distributed file system according to claim 3, wherein the establishing a mapping relationship between the container and the storage space according to the characteristic information of the container and the characteristic information of the storage space comprises:
according to the IP address of the host machine of the container and the storage access IP address of the storage space, mounting the storage space to the local host machine of the container;
and establishing a mapping relation between the storage space and the container according to the storage identifier of the storage space and the container identifier of the container.
5. A container storage space processing apparatus based on a distributed file system, comprising:
the request module is used for receiving a container creation request sent by a user and generating a corresponding storage space creation request according to the container creation request so as to enable a preset distributed file system to create a corresponding storage space according to the storage space creation request;
and the mounting module is used for creating a corresponding container according to the container creation request and establishing a mapping relation between the container and the storage space.
6. The distributed file system based container storage space processing apparatus of claim 5, wherein the request module comprises:
and the linkage creation request determining unit is used for generating a corresponding storage space creation request according to the storage space requirement information and the container characteristic information in the container creation request, so that a preset distributed file system determines the size and the type of the storage space according to the storage space creation request, and generates a corresponding storage space according to the size and the type of the storage space.
7. The distributed file system based container storage space processing apparatus of claim 5, wherein the mount module comprises:
and the characteristic mapping unit is used for creating a corresponding container according to the container creation request and establishing a mapping relation between the container and the storage space according to the container characteristic information of the container and the storage space characteristic information of the storage space.
8. The distributed file system based container storage space processing apparatus according to claim 7, wherein said feature mapping unit comprises:
the dynamic mounting subunit is used for mounting the storage space to the host of the container according to the host IP address of the container and the storage access IP address of the storage space;
and the internal mapping subunit is used for establishing the mapping relation between the storage space and the container according to the storage identifier of the storage space and the container identifier of the container.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the distributed file system based container storage space processing method of any one of claims 1 to 4 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the distributed file system based container storage space processing method according to any one of claims 1 to 4.
CN202010585058.2A 2020-06-24 2020-06-24 Container storage space processing method and device based on distributed file system Active CN111767118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010585058.2A CN111767118B (en) 2020-06-24 2020-06-24 Container storage space processing method and device based on distributed file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010585058.2A CN111767118B (en) 2020-06-24 2020-06-24 Container storage space processing method and device based on distributed file system

Publications (2)

Publication Number Publication Date
CN111767118A true CN111767118A (en) 2020-10-13
CN111767118B CN111767118B (en) 2024-06-18

Family

ID=72722150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010585058.2A Active CN111767118B (en) 2020-06-24 2020-06-24 Container storage space processing method and device based on distributed file system

Country Status (1)

Country Link
CN (1) CN111767118B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882653A (en) * 2021-01-26 2021-06-01 北京金山云网络技术有限公司 Storage volume creation method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301022A (en) * 2017-06-27 2017-10-27 北京溢思得瑞智能科技研究院有限公司 A kind of storage access method and system based on container technique
CN108509152A (en) * 2018-03-20 2018-09-07 新华三云计算技术有限公司 A kind of method and device for realizing the storage of container runtime data
CN108681434A (en) * 2018-05-24 2018-10-19 中科边缘智慧信息科技(苏州)有限公司 A kind of container persistent storage hanging method
CN110019081A (en) * 2017-07-20 2019-07-16 中兴通讯股份有限公司 Data persistence processing method, device, system and readable storage medium storing program for executing
CN111290826A (en) * 2018-12-06 2020-06-16 北京京东尚科信息技术有限公司 Distributed file system, computer system, and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301022A (en) * 2017-06-27 2017-10-27 北京溢思得瑞智能科技研究院有限公司 A kind of storage access method and system based on container technique
CN110019081A (en) * 2017-07-20 2019-07-16 中兴通讯股份有限公司 Data persistence processing method, device, system and readable storage medium storing program for executing
CN108509152A (en) * 2018-03-20 2018-09-07 新华三云计算技术有限公司 A kind of method and device for realizing the storage of container runtime data
CN108681434A (en) * 2018-05-24 2018-10-19 中科边缘智慧信息科技(苏州)有限公司 A kind of container persistent storage hanging method
CN111290826A (en) * 2018-12-06 2020-06-16 北京京东尚科信息技术有限公司 Distributed file system, computer system, and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112882653A (en) * 2021-01-26 2021-06-01 北京金山云网络技术有限公司 Storage volume creation method and device and electronic equipment

Also Published As

Publication number Publication date
CN111767118B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
CN111031058A (en) Websocket-based distributed server cluster interaction method and device
CN111340470B (en) Block chain transaction processing method, node and contract container
CN111679790B (en) Remote software development storage space allocation method and device
CN107580011B (en) Data sharing method and desktop cloud server
EP3779690A1 (en) Processor core scheduling method and apparatus, terminal, and storage medium
CN112689012A (en) Cross-network proxy communication method and device
CN112328413B (en) Application service calling method, device and system
CN112835524A (en) Storage resource allocation method, storage resource controller and scheduling system
CN111445331A (en) Transaction matching method and device
CN111510493B (en) Distributed data transmission method and device
CN102891858A (en) Method and system for network data transmission and proxy server
CN111865676A (en) Configuration file update checking method, device, server and storage medium
US20170155739A1 (en) Advertisement data processing method and router
CN112396511B (en) Distributed wind control variable data processing method, device and system
CN104506616A (en) Method, device and system for sending information by browser client side
CN111767118B (en) Container storage space processing method and device based on distributed file system
CN114374614B (en) Network topology configuration method and device
CN114416212A (en) Mobile terminal application program data resource processing method and device
CN115099930A (en) Financial business data processing method and device
CN114710496A (en) Multi-node load balancing method and device
CN114138895A (en) Data synchronization method and device for multiple data sources, computer equipment and storage medium
CN113778546A (en) Method and device for gray scale optimization
CN113176854A (en) Service management data processing method, device and system
CN112734545A (en) Block chain data sharing method, device and system
CN114090489B (en) IO expansion method and device based on virtio

Legal Events

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