CN117271063A - File system reloading method and device, electronic equipment and storage medium - Google Patents

File system reloading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117271063A
CN117271063A CN202311329902.5A CN202311329902A CN117271063A CN 117271063 A CN117271063 A CN 117271063A CN 202311329902 A CN202311329902 A CN 202311329902A CN 117271063 A CN117271063 A CN 117271063A
Authority
CN
China
Prior art keywords
file system
lxcfs
directory
container
event
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
CN202311329902.5A
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 Qingyun Science And Technology Co ltd
Original Assignee
Beijing Qingyun 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 Qingyun Science And Technology Co ltd filed Critical Beijing Qingyun Science And Technology Co ltd
Priority to CN202311329902.5A priority Critical patent/CN117271063A/en
Publication of CN117271063A publication Critical patent/CN117271063A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • 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/45575Starting, stopping, suspending or resuming virtual machine instances
    • 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/45587Isolation or security of virtual machine instances
    • 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/45595Network integration; Enabling network access in 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)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a file system reloading method, a file system reloading device, electronic equipment and a storage medium, wherein the method comprises the following steps: and responding to a file system completion starting event, binding an lxcfs file system of a host to a temporary directory under a root directory of a target container according to a service manager, and binding a procfs file under the temporary directory to the root directory. According to the embodiment of the invention, when the lxcfs file system is restarted due to the occurrence of defects, upgrading, misoperation and other scenes, the reloading and binding recovery operation of the restarted lxcfs file system can be completed in a mode of intercepting the callback of the designated event, so that the container can recover the access to the lxcfs file system without perception, and the continuity and stability of the container service are effectively ensured.

Description

File system reloading method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of container technologies, and in particular, to a file system reloading method, device, electronic apparatus, and storage medium.
Background
The container technology serves as a virtualization technology for isolating applications and their dependent operating environments at the operating system level, packaging applications, library files, configurations, etc. into a single container, and providing a lightweight, portable, extensible, and consistent operating environment. The lxcfs file system is a file system specifically designed for use by containers, which is implemented using FUSE (user state file system) technology, allowing each container to access a separate isolated procfs file. The lxcfs file system defaults to use a service manager to configure operation behaviors such as starting, closing, restarting and the like, when the lxcfs file system is restarted due to the situations such as defects, upgrading, misoperation and the like, a container in an operation state cannot continue to use the lxcfs file system, and an error can be returned to access of the lxcfs file system, if the access needs to be restored, the container must be closed and restarted, and the restoration method can cause interruption of online service and seriously affect the continuity and stability of the container service.
Disclosure of Invention
The invention provides a file system reloading method, a file system reloading device, electronic equipment and a storage medium, which are used for realizing automatic reloading of an lxcfs file system after the lxcfs file system is restarted, so that a container does not have the perception of recovering the access to the lxcfs file system, and the influence on the continuity and stability of a container service is avoided.
According to an aspect of the present invention, there is provided a file system reloading method, the method comprising:
responding to a file system completion starting event, and binding an lxcfs file system of a host machine to a temporary directory under a root directory of a target container according to a service manager;
binding the procfs file under the temporary directory to the root directory.
According to another aspect of the present invention, there is provided a file system reloading apparatus, the apparatus comprising:
the reloading module is used for responding to the completion of the starting event of the file system and binding the lxcfs file system of the host machine to a temporary directory under the root directory of the target container according to the service manager;
and the repair module is used for binding the procfs file under the temporary directory to the root directory.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the file system reload method of any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement a file system reload method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the starting event is completed by responding to the file system, the lxcfs file system of the host is bound to the temporary directory under the root directory of the target container according to the service manager, and the procfs file under the temporary directory is bound to the root directory, so that the reloading and binding recovery operation of the restarted lxcfs file system are completed by intercepting a callback mode of a specified event, and after the lxcfs file system is restarted, the lxcfs file system is reloaded automatically, so that the container does not feel to recover the access to the lxcfs file system, and the influence on the continuity and stability of a container service is avoided.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for reloading a file system according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for reloading a file system according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a method for reloading a file system according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a file system reloading apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a file system reloading method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a file system reloading method according to an embodiment of the present invention, where the method may be implemented by a file system reloading device, and the file system reloading device may be implemented in the form of hardware and/or software, and the electronic device may be configured in an electronic device, for example, a computer device or a server, and the like, where after the lxcfs file system is restarted, the lxcfs file system is reloaded automatically so that the container does not have a sense of recovering access to the lxcfs file system. As shown in fig. 1, the method for reloading a file system provided in the first embodiment specifically includes the following steps:
s110, responding to the file system completion starting event, and binding the lxcfs file system of the host machine to a temporary directory under the root directory of the target container according to the service manager.
Wherein the service manager may refer to a series of service managers for managing the lxcfs file system, the service manager may comprise at least one of: the system service manager, the Supervisord service manager and all other service managers capable of managing the starting and closing of the lxcfs file system service. The lxcfs file system is a file system specially designed for containers, which is realized by using FUSE (user state file system) technology, and can enable each container to access a respective isolated procfs file, and the lxcfs file system is a resident process running on a host machine and can be used for automatically maintaining the mapping relation between the real resource information of the container in the host machine cgroup and the files in/under the container. The file system completion start event may be understood as an event configured in advance in the service manager for completing the start of the lxcfs file system, and after the file system completion start event is triggered, the corresponding callback function may be automatically invoked and executed. The target container may refer to a container that needs to have no perceived restoration of access to the lxcfs file system after the lxcfs file system is restarted, and the target container may be an isolated space created on the host machine by using a container technology, for example, the target container may be a docker container (container) or a container instance.
In the embodiment of the invention, a file system completion starting event aiming at the lxcfs file can be preconfigured in the service manager, the service manager is controlled to monitor the state (starting, restarting, running, closing and the like) of the lxcfs file system in the host, when the service manager intercepts the file system completion starting event, namely, the lxcfs file system completes starting and restarting operations, the service manager can call a preconfigured corresponding callback function, newly builds a temporary directory under the root directory of a target container operated by the host, and rebinds the directory of the restarted lxcfs file system to the temporary directory, thereby completing the reloading operation of the lxcfs file system of the host.
S120, binding the procfs file under the temporary directory to the root directory.
Where procfs may refer to a process file system (process file system) in many Unix-like computer systems, such as Linux systems, is a virtual file system that is created immediately upon system startup and is broken up upon system shutdown, primarily for accessing process information and system information through the kernel, and may modify kernel parameters to change system behavior.
In the embodiment of the invention, after the lxcfs file system reloads, the procafs file under the temporary directory can be bound to the corresponding file under the root directory of the target container, so that the access of the target container to the lxcfs file system is restored, wherein the binding mode of the procafs file under the temporary directory to the root directory can be as follows: and traversing all the procfs files under the temporary directory in the target container in the running state, and binding the procfs files to the corresponding files under the root directory of the target container.
Further, on the basis of the foregoing embodiment of the present invention, the method for reloading a file system may further include a cleaning operation for the lxcfs file system, that is, after the target container (instance) completes the pre-startup or shutdown operation, cleaning the temporary directory generated by executing the reloading operation in S110, and if a new temporary directory exists under the root directory, executing the unbinding operation and deleting the corresponding temporary directory.
It may be understood that the technical description of the embodiments of the present invention is mainly described with respect to a single container or a container instance, and in practical application, for all containers or container instances in a host, according to the file system reloading method provided by the embodiments of the present invention, after the lxcfs file system is restarted, the lxcfs file system is automatically reloaded, so that the corresponding container or container instance does not have the technical effect of perceptively recovering access to the lxcfs file system, and the specific implementation process is the same as that of the above embodiments, so that the description is omitted.
According to the technical scheme, the starting event is completed by responding to the file system, the lxcfs file system of the host is bound to the temporary directory under the root directory of the target container according to the service manager, and the procfs file under the temporary directory is bound to the root directory, so that the reloading and binding recovery operation of the restarted lxcfs file system are completed by intercepting a callback mode of a specified event, and after the lxcfs file system is restarted, the lxcfs file system is reloaded automatically, so that the container does not feel to recover the access to the lxcfs file system, and the influence on the continuity and stability of a container service is avoided.
Example two
Fig. 2 is a flowchart of a file system reloading method according to a second embodiment of the present invention, which is further optimized and expanded based on the foregoing embodiments, and may be combined with each of the optional technical solutions in the foregoing embodiments. As shown in fig. 2, the method for reloading a file system provided in the second embodiment specifically includes the following steps:
s210, responding to a file system completion starting event, calling a corresponding file system completion starting event callback function to control a service manager to newly establish a temporary directory under the root directory of a target container, and rebinding the directory of the restarted lxcfs file system to the temporary directory.
In the embodiment of the invention, the service manager can be controlled to monitor the state of the lxcfs file system in the host, when the lxcfs file system is intercepted and triggered by the completion of a starting event, namely, after the lxcfs file system completes starting and restarting operations, the service manager can call a preconfigured file system to complete a callback function of the starting event to complete the reloading operation of the lxcfs file system of the host, and the concrete process is as follows: and the control service manager newly builds a temporary directory under the root directory of the target container operated by the host machine, and rebinds the directory of the restarted lxcfs file system to the temporary directory.
S220, traversing all the procfs files under the temporary directory in the target container, and binding the procfs files to the corresponding files under the root directory.
In the embodiment of the invention, after the lxcfs file system reloads, all the procafs files under the temporary directory can be traversed in the target container in the running state and bound to the corresponding files under the target container root directory, and after the binding operation of the procafs files is completed, the target container can restore the access to the lxcfs file system.
Further, on the basis of the above embodiment of the present invention, the method for reloading a file system provided in this embodiment further includes:
and in response to the container instance completing the pre-boot event or the container instance completing the shutdown event, unbinding the temporary directory and deleting the temporary directory.
Wherein, the container instance complete pre-start event may be understood as an event pre-configured in the container management service for container instance pre-start completion. Similarly, a container instance complete shutdown event may be understood as an event preconfigured in the container management service for container instance shutdown completion.
In the embodiment of the present invention, when the container management service intercepts the container instance completing the pre-start event or the container instance completing the close event, that is, after the target container (instance) completes the pre-start or close operation, the corresponding callback function may be invoked to clean the temporary directory generated by executing the reload operation in the foregoing S210, which specifically includes: searching a path under the root directory of the target container, and if the temporary directory newly built in the S210 exists under the root directory, executing the unbinding operation and deleting the corresponding temporary directory.
Further, on the basis of the above embodiment of the present invention, the method for reloading a file system provided in this embodiment further includes:
pre-configuring at least the following callback functions in the service manager: the file system completes the callback function of the starting event; pre-configuring at least the following callback functions in the container management service: the container instance completes the pre-start event callback function, and the container instance completes the close event callback function.
According to the technical scheme, a corresponding file system completion starting event callback function is called to control a service manager to newly establish a temporary directory under a root directory of a target container by responding to a file system completion starting event, and the directory of the restarted lxcfs file system is rebindd to the temporary directory; traversing all the procfs files under the temporary directory in the target container, and binding the procfs files to the corresponding files under the root directory. According to the embodiment of the invention, the reloading and binding recovery operation of the restarted lxcfs file system are completed in a mode of intercepting the appointed event callback, and the lxcfs file system can be automatically reloaded after the lxcfs file system is restarted, so that the container does not feel to recover the access to the lxcfs file system, and the continuity and stability of the container service are effectively ensured.
Example III
Fig. 3 is a flowchart of a file system reloading method according to a third embodiment of the present invention, where the third embodiment provides an implementation manner of the file system reloading method based on the foregoing embodiments, so that after the lxcfs file system is restarted, the lxcfs file system is reloaded automatically, so that the container does not have a sense of recovering access to the lxcfs file system. As shown in fig. 3, a file system reloading method provided in a third embodiment of the present invention specifically includes the following steps:
s310, responding to the completion of the starting event of the file system, controlling the service manager to newly establish a temporary directory under the root directory of the target container, and rebinding the directory of the restarted lxcfs file system to the temporary directory.
In the embodiment of the present invention, callback operation of the lxcfs file system after completion of the start event may be configured in advance in the service manager as S310, that is, when the lxcfs file system is started and restarted, S310 will be executed on a container instance in a running state (no operation in a non-running state), where the specific process is: when the situations of lxcfs file system defect, upgrading, misoperation and the like occur, after intercepting a file system to complete a starting event, a service manager can complete reloading operation of the host lxcfs file system by calling a corresponding callback function, and the lxcfs file system of the host is bound to a temporary directory under a target container root directory.
S320, traversing all the procfs files under the temporary directory in the target container, and binding the procfs files to the corresponding files under the root directory.
In the embodiment of the invention, after the lxcfs file system reloads, all the procfs files under the temporary directory can be traversed in the target container in the running state and bound to the corresponding files under the target container root directory, so that the target container recovers the access to the lxcfs file system.
S330, in response to the container instance completing the pre-start event or the container instance completing the close event, unbinding the temporary directory and deleting the temporary directory.
In the embodiment of the present invention, the callback operation of the container for completing the pre-start and completing the close event may be preconfigured in the container management service as step S330, that is, the target container will execute step S330 before starting and after closing, and the specific process is as follows: when the container management service intercepts the container instance completing the pre-start event or the container instance completing the close event, that is, after the target container (instance) completes the pre-start or close operation, the corresponding callback function may be called to clean the temporary directory generated by executing the reload operation in the foregoing S310, and if the temporary directory newly created in the S310 exists under the root directory, the unbinding operation is executed and the corresponding temporary directory is deleted.
It will be appreciated that the content of the operation generated in S320 will be automatically cleaned up by the operating system with the closing of the container instance, so no additional operations are required.
According to the technical scheme, a service manager is controlled to newly establish a temporary directory under the root directory of a target container by responding to a file system completion starting event, and the directory of the restarted lxcfs file system is rebindd to the temporary directory; traversing all the procfs files under the temporary directory in the target container, and binding the procfs files to the corresponding files under the root directory; and in response to the container instance completing the pre-boot event or the container instance completing the shutdown event, unbinding the temporary directory and deleting the temporary directory. According to the embodiment of the invention, when the lxcfs file system is restarted due to the occurrence of defects, upgrading, misoperation and other scenes, the reloading and binding recovery operation of the restarted lxcfs file system can be completed in a mode of intercepting the callback of the designated event, so that the container can recover the access to the lxcfs file system without perception, and the continuity and stability of the container service are effectively ensured.
Example IV
Fig. 4 is a schematic structural diagram of a file system reloading apparatus according to a fourth embodiment of the present invention. As shown in fig. 4, the apparatus includes:
and a reload module 41, configured to bind the lxcfs file system of the host to the temporary directory under the root directory of the target container according to the service manager in response to the file system completion start event.
The repair module 42 is configured to bind the procfs file under the temporary directory to the root directory.
According to the technical scheme, the reloading module responds to the file system to finish a starting event, the lxcfs file system of the host is bound to the temporary directory under the root directory of the target container according to the service manager, and the repairing module binds the procfs file under the temporary directory to the root directory, so that the reloading and binding recovery operation of the restarted lxcfs file system are finished in a mode of intercepting a callback of a designated event, and after the lxcfs file system is restarted, the lxcfs file system is automatically reloaded to enable the container to recover the access to the lxcfs file system without perception, and the influence on the continuity and stability of a container service is avoided.
Further, on the basis of the above embodiment of the invention, the reload module 41 includes:
and the host lxcfs reentry unit is used for responding to the completion of the file system start event, calling the corresponding file system completion start event callback function to control the service manager to newly establish a temporary directory under the root directory of the target container, and re-binding the directory of the restarted lxcfs file system to the temporary directory.
Further, on the basis of the above embodiment of the invention, the repair module 42 includes:
and the container lxcfs repairing unit is used for traversing all the procfs files under the temporary directory in the target container and binding the procfs files to the corresponding files under the root directory.
Further, on the basis of the embodiment of the present invention, the file system reloading apparatus further includes:
and the cleaning module is used for unbinding the temporary catalogue and deleting the temporary catalogue in response to the container instance completing the pre-starting event or the container instance completing the closing event.
Further, on the basis of the embodiment of the present invention, the file system reloading apparatus further includes:
a callback function configuration module, configured to pre-configure at least the following callback functions in the service manager: the file system completes the callback function of the starting event; pre-configuring at least the following callback functions in the container management service: the container instance completes the pre-start event callback function, and the container instance completes the close event callback function.
Further, on the basis of the above embodiment of the invention, the service manager includes at least one of: the system service manager, the Supervisord service manager and all other service managers capable of managing the starting and closing of the lxcfs file system service.
The file system reloading device provided by the embodiment of the invention can execute the file system reloading method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example five
Fig. 5 shows a schematic diagram of an electronic device 50 that may be used to implement an embodiment of the invention. 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. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 50 includes at least one processor 51, and a memory, such as a Read Only Memory (ROM) 52, a Random Access Memory (RAM) 53, etc., communicatively connected to the at least one processor 51, in which the memory stores a computer program executable by the at least one processor, and the processor 51 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 52 or the computer program loaded from the storage unit 58 into the Random Access Memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, the ROM 52 and the RAM 53 are connected to each other via a bus 54. An input/output (I/O) interface 55 is also connected to bus 54.
Various components in the electronic device 50 are connected to the I/O interface 55, including: an input unit 56 such as a keyboard, a mouse, etc.; an output unit 57 such as various types of displays, speakers, and the like; a storage unit 58 such as a magnetic disk, an optical disk, or the like; and a communication unit 59 such as a network card, modem, wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The processor 51 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 51 performs the various methods and processes described above, such as the file system reload method.
In some embodiments, the file system reload method may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 50 via the ROM 52 and/or the communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the file system reload method described above may be performed. Alternatively, in other embodiments, processor 51 may be configured to perform the file system reload method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program 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 the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage 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. Alternatively, the computer readable storage medium may be a machine readable signal medium. 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 an electronic device 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) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically 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 hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for reloading a file system, the method comprising:
responding to a file system completion starting event, and binding an lxcfs file system of a host machine to a temporary directory under a root directory of a target container according to a service manager;
binding the procfs file under the temporary directory to the root directory.
2. The method of claim 1, wherein binding the lxcfs file system of the host machine to the temporary directory under the root directory of the target container according to the service manager in response to the file system completion initiation event comprises:
and responding to the file system completion starting event, calling a corresponding file system completion starting event callback function to control the service manager to newly establish the temporary directory under the root directory of the target container, and rebinding the directory of the restarted lxcfs file system to the temporary directory.
3. The method of claim 1, wherein the binding the procfs file under the temporary directory to the root directory comprises:
traversing all the procfs files under the temporary directory in the target container, and binding the procfs files to corresponding files under the root directory.
4. The method as recited in claim 1, further comprising:
and in response to a container instance completion pre-start event or a container instance completion close event, unbinding the temporary directory and deleting the temporary directory.
5. The method as recited in claim 1, further comprising:
pre-configuring at least the following callback functions in the service manager: the file system completes the callback function of the starting event; pre-configuring at least the following callback functions in the container management service: the container instance completes the pre-start event callback function, and the container instance completes the close event callback function.
6. The method of claim 1, wherein the service manager comprises at least one of: the system service manager, the Supervisord service manager and all other service managers capable of managing the starting and closing of the lxcfs file system service.
7. A file system reloading apparatus, said apparatus comprising:
the reloading module is used for responding to the completion of the starting event of the file system and binding the lxcfs file system of the host machine to a temporary directory under the root directory of the target container according to the service manager;
and the repair module is used for binding the procfs file under the temporary directory to the root directory.
8. The apparatus as recited in claim 7, further comprising:
and the cleaning module is used for unbinding the temporary catalogue and deleting the temporary catalogue in response to a container instance completing pre-starting event or a container instance completing closing event.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the file system reload method of any of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the file system reload method of any of claims 1-6 when executed.
CN202311329902.5A 2023-10-13 2023-10-13 File system reloading method and device, electronic equipment and storage medium Pending CN117271063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311329902.5A CN117271063A (en) 2023-10-13 2023-10-13 File system reloading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311329902.5A CN117271063A (en) 2023-10-13 2023-10-13 File system reloading method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117271063A true CN117271063A (en) 2023-12-22

Family

ID=89217632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311329902.5A Pending CN117271063A (en) 2023-10-13 2023-10-13 File system reloading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117271063A (en)

Similar Documents

Publication Publication Date Title
US9465697B2 (en) Provision of backup functionalities in cloud computing systems
US9317373B2 (en) Snapshots in a hybrid storage device comprising a magnetic disk and a solid state disk
CN115794257B (en) System starting method, device, electronic equipment and storage medium
CN115580645A (en) Service switching method and device, electronic equipment and storage medium
CN107402839B (en) Method and system for backing up data
US20150220517A1 (en) Efficient conflict resolution among stateless processes
JP2018072944A (en) Program, system and information processing method
CN117271063A (en) File system reloading method and device, electronic equipment and storage medium
CN114228745B (en) Driving system module control method, device, equipment, medium, product and vehicle
CN113747423B (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
CN115454515A (en) System processing method and device and electronic equipment
CN114995958A (en) Virtualization platform information consistency control method, device and medium
CN113051122B (en) Performance data acquisition method, device, electronic equipment and medium
CN114564211A (en) Cluster deployment method, cluster deployment device, equipment and medium
JP5317182B2 (en) POS terminal, module update method and module update program
CN111258954B (en) Data migration method, device, equipment and storage medium
CN118113410A (en) Cluster operation and maintenance method and device, electronic equipment and storage medium
CN117707643A (en) Plug-in building method and device and plug-in running method and device
CN116126403A (en) Operating system deployment method and device, electronic equipment and storage medium
CN117785059A (en) Database log real-time management method, system, equipment and storage medium
CN114721871A (en) Data backup method and device and electronic equipment
CN117270889A (en) System configuration method, device, electronic equipment and storage medium
CN118012660A (en) System abnormal starting recovery method, device, equipment and storage medium
CN117667896A (en) Service migration method, device, equipment, storage medium and system
CN117407111A (en) Method and device for starting graphic display service, electronic equipment and storage medium

Legal Events

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