CN114064210A - Data volume changing method, device, equipment and storage medium - Google Patents

Data volume changing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114064210A
CN114064210A CN202111348035.0A CN202111348035A CN114064210A CN 114064210 A CN114064210 A CN 114064210A CN 202111348035 A CN202111348035 A CN 202111348035A CN 114064210 A CN114064210 A CN 114064210A
Authority
CN
China
Prior art keywords
data volume
directory
name
sub
changing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111348035.0A
Other languages
Chinese (zh)
Inventor
宋家亮
畅明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111348035.0A priority Critical patent/CN114064210A/en
Publication of CN114064210A publication Critical patent/CN114064210A/en
Pending legal-status Critical Current

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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

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

Abstract

The disclosure provides a data volume changing method, a data volume changing device, an electronic device and a non-transitory computer readable storage medium, relates to the technical field of computers, in particular to a cloud computing technology, and can be used in the field of cloud mobile phones. The specific implementation scheme is as follows: responding to a data volume change request of a target container group, and acquiring a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume father catalog corresponding to the remote absolute path and a data volume child catalog corresponding to the local relative path; changing the original name of the data volume sub-directory; adding a substitute sub directory with a directory name as an original name under a data volume parent directory; and the target container group is mounted under the data volume directory again, and the containers in the target container group are restarted. According to the technology disclosed by the invention, the data volume change efficiency, the data volume change flexibility and the data volume change result accuracy are improved.

Description

Data volume changing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a cloud computing technology, which can be used in the field of cloud phones, and in particular, to a data volume change method, a data volume change apparatus, an electronic device, and a non-transitory computer-readable storage medium.
Background
With the rapid development of virtualization technologies, container technologies lighter than virtual machines have come into force.
The container encapsulates the application and the environment in which the application runs, does not need to install an operating system, and shares a kernel with the host. Data generated by running the application can be persisted in the data volume mounted by the container.
Disclosure of Invention
The present disclosure provides a data volume changing method, a data volume changing apparatus, an electronic device, and a non-transitory computer-readable storage medium.
According to an aspect of the present disclosure, there is provided a data volume change method, including:
responding to a data volume change request of a target container group, and acquiring a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume father catalog corresponding to the remote absolute path and a data volume child catalog corresponding to the local relative path;
changing the original name of the data volume sub-directory;
adding a substitute sub directory with a directory name as an original name under a data volume parent directory;
and the target container group is mounted under the data volume directory again, and the containers in the target container group are restarted.
According to another aspect of the present disclosure, there is also provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the data volume changing methods provided by the present disclosure.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform any one of the data volume changing methods provided by the present disclosure.
According to the technology disclosed by the invention, the change efficiency, the change flexibility and the change result accuracy of the data volume are improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a method for changing a data volume according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another method for changing a data volume according to an embodiment of the present disclosure;
FIG. 3A is a block diagram of a data volume deletion system according to an embodiment of the present disclosure;
FIG. 3B is a flowchart of a method for deleting a data volume according to an embodiment of the present disclosure;
fig. 4 is a structural diagram of a data volume changing apparatus according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for implementing a data volume change method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The data volume changing method and the data volume changing device provided by the present disclosure are suitable for changing the data volume mounted in the container group that implements the business application in the application scene of initializing or upgrading the business application. The data volume changing method provided by the present disclosure may be executed by a data volume changing apparatus, which may be implemented by software and/or hardware and is specifically configured in an electronic device, where the electronic device may be a working node, such as a server, where a container is deployed.
Referring to fig. 1, a data volume change method includes:
s101, responding to a data volume change request of a target container group, and acquiring a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume parent catalog corresponding to the remote absolute path and a data volume child catalog corresponding to the local relative path.
The container group (Pod) is the minimum deployable unit in an open source system for correspondingly deploying, expanding and managing containerized applications, and one container group may include at least one application container, a storage resource, a unique Internet Protocol (IP) address, and an option for determining how the container operates. The container group represents a separate application running instance in the open source system, which may consist of a single or at least two tightly coupled containers. The target container group is a container group having a data volume change requirement in the present disclosure.
The disclosed data volume is essentially a specially designated virtual directory that, with the federated file system of a container group, can provide stable features or data sharing for the container group such that data volumes can be shared between the containers within the container group. The data volume change request may be a request for resetting or replacing the data volume.
Optionally, the data volume change request may be generated periodically, such as periodically. Or optionally, the data volume change request may also be triggered to be generated when the data volume change request is met.
In an alternative embodiment, the data volume change request may be generated based on a reset set operation on the annotation field of the target container group object.
Specifically, a comment field is set in the target container group object to indicate a change to the data volume mounted in the target container group. Illustratively, in response to a reset operation on the annotation field of the target container group object, the field value of the annotation field is set to a reset field value indicating a data volume change requirement of the data volume mounted by the target container group, and a data volume change request is generated.
The annotation field added in the target container group object is set, and the data volume change request is generated based on the setting operation of the annotation field, so that the generation mode of the data volume change request is simplified, the operation is convenient, the batch setting scene can be adapted, and the data volume change efficiency is improved.
It should be noted that the data volume change request may be generated locally at a working node (i.e., a computing device) executing the data volume change method, or may be generated by another device communicatively connected to the working node, such as a control node, so that the change of the data volume mounted on the target container group of the connected at least one working node is realized through a single setting of the control node.
In a specific implementation manner, the reset setting of the comment field of the target container group object may be implemented by a reset operation (e.g., a factory reset operation) of the business application operator. In another specific implementation manner, the resetting of the annotation field of the target container group object may be implemented by the manager performing touch control on the corresponding functional area in the management interface when the service application needs to be downloaded in batch, upgraded in batch, or reset in batch.
The data volume catalog comprises a data volume father catalog and a data volume child catalog under the data volume father catalog. The data volume parent directory corresponds to a remote absolute path, and the remote absolute path is managed by a remote server, so that the data volume parent directory cannot be randomly changed during the mounting period of the data volume. The data volume sub-directory corresponds to a local relative path, and the local relative path is assigned with an access identifier by a local operating system. Therefore, during the mounting of the data volume, the directory name of the data volume sub-directory is modified, and the access identifier is redistributed by the operating system, so that the local relative path can be changed, and further the data volume directory can be changed.
It should be noted that, in the prior art, because the data volume directory is only provided with the single-layer directory corresponding to the remote absolute path, and the secondary directory corresponding to the parent directory and the child directory is not introduced, the change processing on the data volume cannot be realized without stopping the operation of the container. And the container change is stopped, and the container in the target container group can be restarted only after the data volume is changed, so that the change efficiency is reduced.
And S102, changing the original name of the data volume sub-directory.
Optionally, the original name of the data volume sub-directory may be modified by presetting a naming rule. For example, the preset naming rule may be implemented based on a random generation algorithm.
Or optionally, the child directory of the data volume can be changed from the original name to the target name, and only the target name is required to be ensured to be the directory name which is not used under the parent directory of the data volume, so that the constraint of the naming rule is avoided, and the inconvenience caused by repeated naming is avoided.
S103, adding a substitute sub-directory with the directory name as the original name under the data volume parent directory.
The replacement subdirectory can be understood as a new subdirectory which is used for replacing an original data volume subdirectory corresponding to a local relative path in the data volume directory when the data volume directory is changed.
The replacement sub-directory with the directory name as the original name is added under the data volume parent directory, so that the replacement sub-directory replaces the position of the original data volume sub-directory, and the change of the data volume directory is realized from the directory content level.
The substitute sub-directory may be a created empty sub-directory, or a created sub-directory including the set content, or a new sub-directory generated by migrating a folder including the set content from another location. The supplementary sub-directory and the setting content contained in the supplementary sub-directory can be adjusted by combining with the actual application scene.
In an alternative embodiment, a base configuration subdirectory with the directory name of the original name can be added under the data volume parent directory as a substitute subdirectory; the basic configuration subdirectory includes basic configuration data of the target container group for realizing the business function. It will be appreciated that content replacement of a data volume is facilitated by the base configuration subdirectory including base configuration data as a replacement subdirectory.
Specifically, if the target container group is packaged with a business application for realizing the set business function, when the business application needs to be reset to the default version, the folder corresponding to the basic configuration data of the default version is added to the parent directory of the data volume, so as to generate the replacement sub-directory.
It should be noted that the folder corresponding to the basic configuration data may be preset in the parent directory of the data volume, and only the folder name needs to be changed to the original name, so as to modify the supplementary sub-directory. The file folder corresponding to the basic configuration data can be preset under other catalogues, the file folder can be renamed to be the original name, and then the renamed file folder is transferred to the parent catalog of the data volume; or the folder is firstly migrated to the data volume father directory, and then the migrated folder is renamed to the original name.
In another alternative embodiment, an empty child directory with a target name of the original name may be created under the data volume parent directory as a replacement child directory. It will be appreciated that deletion of the contents of the data volume is facilitated by employing the empty subdirectory as a replacement subdirectory.
Specifically, an empty folder with a folder name of the original name may be created under the data volume parent directory, so that an empty child directory with a directory name of the original name may be created under the data volume parent directory, and the empty child directory may be used as a substitute child directory.
And S104, re-mounting the target container group under the data volume directory, and restarting the containers in the target container group.
When the data volume sub-directory is replaced with a replacement sub-directory having a directory name of the original name, the data volume directory is changed only from the content level. Because the data volume sub-directory corresponding to the local relative path is accessed through the access identifier allocated by the operating system, at this time, the access identifier still corresponds to the data volume sub-directory after the original name is changed, but not to the replacement sub-directory. Therefore, it is also necessary to re-mount the data volume directory and restart the containers in the target container group to re-assign the access identifier to the local relative path corresponding to the data volume sub-directory, so as to replace the access identifier of the local relative path of the data volume directory with the access identifier of the replacement sub-directory, thereby implementing the change of the data volume directory from the access aspect.
On the basis of the technical schemes, the storage resources are wasted due to the fact that the number of unused data volume child directories under the data volume parent directory is too large. In order to avoid the situation, the child directories with different names under the parent directory of the data volume can be deleted regularly, so that the child directories with non-original names, namely the unused child directories of the data volume, are cleared, the storage resources are saved, and the overall performance of the execution equipment of the data volume changing method is improved.
It should be noted that the deletion duration, deletion period, deletion interval, and the like of the periodic deletion are not limited in any way, and can be set or adjusted by a skilled person according to actual needs or experience, or determined through a lot of experiments.
The data volume directory is set to comprise a data volume father directory corresponding to a remote absolute path and a data volume child directory corresponding to a local relative path, and the change of the data volume directory is realized on a content level by changing the directory name of the data volume child directory and adding a substitute child directory with the same name; the change of the data volume catalog on the access level is realized by the way of reloading the data volume of the target container group and restarting the container of the container in the target container group. According to the technical scheme, the containers in the target container group do not need to be stopped before the data volume is changed, the data volume is not required to be changed for waiting, and the data volume changing efficiency is improved. Meanwhile, the scheme is realized in an automatic mode, manual intervention is not needed, the labor cost is reduced, and the data volume changing efficiency is further improved. In addition, the scheme can select partial data volumes to change according to requirements under the condition of mounting multiple data volumes, so that the data volume changing process is more flexible.
On the basis of the above technical solutions, the present disclosure also provides an alternative embodiment. In the optional embodiment, optimization improvement is performed on the change operation of the original name of the data volume subdirectory. In addition, in the embodiment, reference may be made to the related expressions of the foregoing embodiments for parts that are not disclosed.
Referring to fig. 2, a data alteration method includes:
s201, responding to a data volume change request of a target container group, and acquiring a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume parent catalog corresponding to the remote absolute path and a data volume child catalog corresponding to the local relative path.
S202, changing the data volume sub-directory from the original name to a target name; the target name is an unused directory name under the data volume parent directory.
By changing the data volume child directory name into an unused target name under the data volume parent directory, the influence caused by the fact that the name after change is the same as the used directory name is avoided.
The target name may be implemented by at least one name generation method in the prior art, and the generation method of the target name is not limited in any way in the present disclosure.
In an alternative embodiment, the target name may be generated directly based on the current timestamp and the random number.
In another alternative embodiment, the directory name used under the parent directory of the data volume may be identified, and the identified result may be used as the reference name; and generating a target name according to the reference name, and weighing and naming the directory name of the data volume sub-directory to be the target name.
For example, the folder name of each existing folder in the parent directory of the data volume may be read as a reference name; modifying at least part of the reference names to generate target names different from the reference names; and weighing and naming the directory name of the data volume sub-directory as a target name.
In a specific implementation mode, the folder name of an existing folder in a parent directory of a data volume is read as a reference name; the reference name comprises a uniform identifier and a serial number identifier; acquiring a serial number value of a serial number identifier in each reference name; increasing or decreasing the sequence number value according to a preset step length to obtain a target sequence number value; and combining the unified identification and the target sequence number value to obtain a target name.
For example, if the data volume directory is "volume _ parent/volume _ child _ 0", where the directory name of the data volume parent directory is "volume _ parent", the directory name of the data volume child directory is "volume _ child _ 0", and there are no other child directories under the data volume parent directory, that is, there are no other folders under the data volume parent directory except for the folder name of "volume _ child _ 0", the directory name of the data volume child directory may be changed from "volume _ child _ 0" to "volume _ child _ 1". Continuing with the previous example, if there are other sub-directories with a directory name of "volume _ child _ 1" under the data volume parent directory, that is, the data volume parent directory includes two folders "volume _ child _ 0" and "volume _ child _ 1", the directory name of the data volume child directory may be changed from "volume _ child _ 0" to "volume _ child _ 2" different from "volume _ child _ 1".
It can be understood that, by introducing and identifying the used reference name, the target name different from the reference name is generated, so that the influence caused by the fact that the generated target name is the same as the used directory name is avoided, meanwhile, the generation mode of the target name is simplified, the data calculation amount generated by the target name is reduced, the generation efficiency of the target name is improved, and the change efficiency of data volume change and the accuracy of a change result are improved.
In general, in order to ensure the stability of the file system where the corresponding execution device of the data volume change method is located, there is only one valid subdirectory under the parent directory of the data volume, that is, only one subdirectory (the subdirectory with the same name as the original name) is mounted in the target container group, and the other subdirectories are invalid subdirectories. In order to reduce the occupation amount of storage space caused by invalid subdirectories, subdirectories different from the original names under the data volume parent directory can be deleted periodically.
When the change frequency of the data volume mounted by the target container group is high and the sub-directories with different names from the original names under the parent directory of the data volume are not deleted regularly, a large number of invalid sub-directories exist under the parent directory of the data volume, so that the waste of storage resources is caused, and the operation efficiency of equipment is influenced. In order to avoid the above situation, in an optional embodiment, after a substitute sub-directory whose directory name is the original name is added under the data volume parent directory, the sub-directory under the data volume parent directory which is the same as the target name is deleted, so that after the data volume sub-directory under the data volume parent directory is replaced, the sub-directory before replacement is deleted, and the storage space is saved.
It should be noted that, in order to avoid the situation of deletion failure or incomplete deletion, a child directory different from the original name in the parent directory of the data volume may be deleted periodically, so as to implement the deletion of the bibliography.
S203, adding a substitute sub directory with the directory name as the original name under the data volume parent directory.
S204, the target container group is mounted under the data volume directory again, and the containers in the target container group are restarted.
The method and the device have the advantages that the change operation of the original name of the subdirectory of the data volume is refined into the change of the original name of the subdirectory of the data volume into the target name; the target name is an unused directory name in the data volume parent directory, so that the problem that the target name is the same as the used directory name in the data volume parent directory to cause data volume change failure or other influences is avoided, the data volume change efficiency is improved, and the stability of a file system of the corresponding execution device of the data volume change method is improved.
On the basis of the above technical solutions, the present disclosure also provides a preferred embodiment for implementing deletion of a data volume. The following description will be made in detail with reference to a flowchart of a data volume deletion system shown in fig. 3A and a flowchart of a data volume deletion method shown in fig. 3B. The data volume deleting method comprises the following steps:
s301, the control node responds to the reset operation of the operator, sets the comment field of the target container group object as a deletion identifier, and generates a data volume deletion request.
S302, the working node monitors the control node to obtain a data volume deleting request.
S303, the working node acquires a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume parent catalog corresponding to the remote absolute path and a data volume child catalog corresponding to the local relative path.
S304, the original name of the data volume child directory is weighed and named as an unused target name under the data volume parent directory.
S305, creating an empty child directory with the directory name as the original name under the data volume parent directory.
And S306, deleting the subdirectory with the same target name under the parent directory of the data volume.
S307, the target container group is mounted under the data volume directory again, and the containers in the target container group are restarted.
And S308, periodically deleting the subdirectories which are different from the original names under the data volume parent directory.
According to the data volume deleting method, manual intervention is not needed, automation of the data volume deleting process is achieved, deleting efficiency of the data volume is improved, and the method is suitable for application scenarios such as rapid resetting of a cloud host. In addition, the data volume deleting operation does not need to stop the operation of the containers in the target container group before deleting, and does not need long waiting time for deleting the data volume, thereby improving the deleting efficiency. Meanwhile, the scheme can reserve temporary data in the target container group, support the cleaning of the specified data volume in a multi-data volume scene, reserve contents in other data volumes and achieve better flexibility.
As an implementation of each of the above-described data volume changing methods, the present disclosure also provides an alternative embodiment of an execution device that implements the data volume changing method. Further referring to fig. 4, a data volume change method includes:
referring to fig. 4, a data volume changing apparatus includes: a data volume directory obtaining module 401, an original name changing module 402, a replacement sub-directory adding module 403 and a mount restarting module 404. Wherein the content of the first and second substances,
a data volume catalog obtaining module 401, configured to respond to a data volume change request for a target container group, and obtain a data volume catalog mounted on the target container group; the data volume catalog comprises a data volume father catalog corresponding to the remote absolute path and a data volume child catalog corresponding to the local relative path;
an original name changing module 402, configured to change an original name of the data volume sub-directory;
a supplementary sub-directory adding module 403, configured to add a supplementary sub-directory with a directory name being an original name under a parent directory of the data volume;
and a mount restart module 404, configured to reload the target container group under the data volume directory, and restart the containers in the target container group.
The data volume directory is set to comprise a data volume father directory corresponding to a remote absolute path and a data volume child directory corresponding to a local relative path, and the change of the data volume directory is realized on a content level by changing the directory name of the data volume child directory and adding a substitute child directory with the same name; the change of the data volume catalog on the access level is realized by the way of reloading the data volume of the target container group and restarting the container of the container in the target container group. According to the technical scheme, the containers in the target container group do not need to be stopped before the data volume is changed, the data volume is not required to be changed for waiting, and the data volume changing efficiency is improved. Meanwhile, the scheme is realized in an automatic mode, manual intervention is not needed, the labor cost is reduced, and the data volume changing efficiency is further improved. In addition, the scheme can select partial data volumes to change according to requirements under the condition of mounting multiple data volumes, so that the data volume changing process is more flexible.
In an alternative embodiment, the original name changing module 402 includes:
the original name changing unit is used for changing the data volume sub-directory from the original name to the target name; the target name is an unused directory name under the data volume parent directory.
In an optional embodiment, the original name changing unit includes:
a reference name identifying subunit configured to identify a directory name that has been used under the parent directory of the data volume, and to take the identification result as the reference name;
and the target name generating subunit is used for generating a target name according to the reference name and weighing and naming the directory name of the data volume sub-directory as the target name.
In an alternative embodiment, the original name changing module 402 further includes:
and the sub-directory deleting unit is used for deleting the sub-directory with the same directory name as the target name under the data volume parent directory after adding a substitute sub-directory with the directory name as the original name under the data volume parent directory.
In an alternative embodiment, the substitute subdirectory adding module 403 includes:
the basic configuration subdirectory adding unit is used for adding a basic configuration subdirectory with the directory name of the original name under the data volume father directory as a substitute subdirectory; the basic configuration subdirectory comprises basic configuration data of the target container group for realizing the business function; alternatively, the first and second electrodes may be,
and the empty child directory adding unit is used for creating an empty child directory with the directory name as the original name under the data volume parent directory as a substitute child directory.
In an optional embodiment, the data volume changing apparatus further includes:
and the regular deleting module is used for regularly deleting the sub-directories which are different from the original names under the data volume parent directory.
In an alternative embodiment, the data volume change request is generated based on a reset set operation on the annotation field of the target container group object.
The data volume changing device can execute the data volume changing method provided by any embodiment of the disclosure, and has functional modules and beneficial effects corresponding to the execution of each data volume changing method.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the related data volume catalog meet the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 comprises a computing unit 501 which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 501 executes the various methods and processes described above, such as the data volume change method. For example, in some embodiments, the data volume change method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the data volume change method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the data volume change method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome. The server may also be a server of a distributed system, or a server incorporating a blockchain.
Cloud computing (cloud computing) refers to a technology system that accesses a flexibly extensible shared physical or virtual resource pool through a network, where resources may include servers, operating systems, networks, software, applications, storage devices, and the like, and may be deployed and managed in a self-service manner as needed. Through the cloud computing technology, high-efficiency and strong data processing capacity can be provided for technical application and model training of artificial intelligence, block chains and the like.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A data volume change method, comprising:
responding to a data volume change request of a target container group, and acquiring a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume father catalog corresponding to a remote absolute path and a data volume child catalog corresponding to a local relative path;
changing the original name of the data volume sub-directory;
adding a substitute subdirectory with the directory name as the original name under the data volume father directory;
and the target container group is mounted under the data volume directory again, and the containers in the target container group are restarted.
2. The data volume change method according to claim 1, wherein the changing the original name of the data volume sub-directory includes:
changing the data volume sub-directory from an original name to a target name; the target name is an unused directory name under the data volume parent directory.
3. The data volume changing method according to claim 2, wherein the changing the data volume sub-directory from an original name to a target name includes:
identifying the used directory name under the parent directory of the data volume, and taking the identification result as a reference name;
and generating the target name according to the reference name, and weighing and naming the directory name of the data volume sub-directory to be the target name.
4. The data volume change method according to claim 2, wherein after adding a replacement sub-directory having a directory name as the original name under the data volume parent directory, the method further comprises:
and deleting the subdirectory under the parent directory of the data volume, which is the same as the target name.
5. The data volume change method according to claim 1, wherein the adding a substitute sub-directory having a directory name as the original name under the data volume parent directory includes:
adding a basic configuration subdirectory with the directory name as the original name under the data volume parent directory as the substitute subdirectory; the basic configuration subdirectory comprises basic configuration data of the target container group for realizing the business function; alternatively, the first and second electrodes may be,
and creating an empty child directory with the directory name as the original name under the data volume parent directory as the substitute child directory.
6. The data volume changing method according to any one of claims 1 to 5, further comprising:
and periodically deleting the subdirectory which is different from the original name under the data volume parent directory.
7. The data volume change method according to any one of claims 1 to 6, wherein the data volume change request is generated based on a reset set operation on a comment field of the target container group object.
8. A data volume changing device includes:
the data volume catalog acquiring module is used for responding to a data volume change request of a target container group and acquiring a data volume catalog mounted by the target container group; the data volume catalog comprises a data volume father catalog corresponding to a remote absolute path and a data volume child catalog corresponding to a local relative path;
the original name changing module is used for changing the original name of the data volume sub-directory;
the supplement subdirectory adding module is used for adding a supplement subdirectory with the directory name as the original name under the data volume father directory;
and the mounting restarting module is used for re-mounting the target container group to the data volume directory and restarting the containers in the target container group.
9. The data volume changing device according to claim 8, wherein the original name changing module includes:
the original name changing unit is used for changing the data volume sub-directory from an original name to a target name; the target name is an unused directory name under the data volume parent directory.
10. The data volume changing device according to claim 9, wherein the original name changing means includes:
a reference name identifying subunit configured to identify a directory name that has been used under the parent directory of the data volume, and use the identification result as a reference name;
and the target name generating subunit is used for generating the target name according to the reference name and weighing and naming the directory name of the data volume sub-directory as the target name.
11. The data volume changing device according to claim 9, wherein the original name changing module further includes:
and the sub-directory deleting unit is used for deleting the sub-directory with the same directory name as the target name in the data volume parent directory after adding a substitute sub-directory with the directory name as the original name in the data volume parent directory.
12. The data volume changing apparatus according to claim 8, wherein the replacement sub-directory adding module includes:
a basic configuration sub-directory adding unit, configured to add a basic configuration sub-directory with a directory name as the original name under the data volume parent directory as the replacement sub-directory; the basic configuration subdirectory comprises basic configuration data of the target container group for realizing the business function; alternatively, the first and second electrodes may be,
and the empty child directory adding unit is used for creating an empty child directory with the directory name as the original name under the data volume parent directory as the substitute child directory.
13. The data volume changing device according to any one of claims 8 to 12, further comprising:
and the regular deleting module is used for regularly deleting the sub-directories which are different from the original name under the data volume parent directory.
14. The data volume change device of any of claims 8-13, wherein the data volume change request is generated based on a reset set operation on a comment field of the target container group object.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data volume change method of any of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the data volume changing method according to any one of claims 1 to 7.
17. A computer program product comprising computer program/instructions which, when executed by a processor, implement the steps of the data volume change method of any one of claims 1-7.
CN202111348035.0A 2021-11-15 2021-11-15 Data volume changing method, device, equipment and storage medium Pending CN114064210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111348035.0A CN114064210A (en) 2021-11-15 2021-11-15 Data volume changing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111348035.0A CN114064210A (en) 2021-11-15 2021-11-15 Data volume changing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114064210A true CN114064210A (en) 2022-02-18

Family

ID=80272166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111348035.0A Pending CN114064210A (en) 2021-11-15 2021-11-15 Data volume changing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114064210A (en)

Similar Documents

Publication Publication Date Title
JP6463393B2 (en) Tenant data recovery across tenant migration
US10838829B2 (en) Method and apparatus for loading data from a mirror server and a non-transitory computer readable storage medium
US9086903B2 (en) Managing virtual hard disk snapshots
US20130091376A1 (en) Self-repairing database system
CN110520844A (en) Cloud management platform, virtual machine management method and its system
CN111787126A (en) Container creation method, server, and storage medium
JP2021515299A (en) A system for chronological out-of-place updates, a method for chronological out-of-place updates, and a computer program for chronological out-of-place updates.
CN114185734A (en) Cluster monitoring method and device and electronic equipment
CN112235132A (en) Method, device, medium and server for dynamically configuring service
CN115934076B (en) Cross-platform client micro-service providing device and method and electronic equipment
CN115061947B (en) Resource management method, device, equipment and storage medium
US9298487B2 (en) Managing virtual machine images in a distributed computing environment
CN114064210A (en) Data volume changing method, device, equipment and storage medium
US11977559B2 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
CN113191136B (en) Data processing method and device
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
CN115576565A (en) Application program deployment method and device, electronic equipment and storage medium
CN118056183A (en) Optimizing just-in-time compilation processes
CN113747423A (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
JP5317182B2 (en) POS terminal, module update method and module update program
CN112749042B (en) Application running method and device
CN116775171B (en) Architecture switching method and device, electronic equipment and storage medium
US11379147B2 (en) Method, device, and computer program product for managing storage system
CN113055500B (en) Address request method, device and computer readable storage medium
CN115168107A (en) Data processing method, device, equipment and medium

Legal Events

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