File system mounting method and apparatus, device, storage medium, and program product

By monitoring the mount file list of container group and updating the mount configuration file, dynamically mounting the files of the target container group, the problem of low mount efficiency in the existing technology is solved, and uninterrupted multi-file synchronization update is achieved.

WO2025141449A1PCT designated stage expired Publication Date: 2025-07-03CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2024/063100
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-28
Filing Date
2024-12-23
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

In Kubernetes clusters, the existing technology cannot dynamically mount data sets for running container groups, resulting in low mount efficiency and requires restarting the container group to update the data set.

Method used

By monitoring the mount file list of the container group, generate or update the mount configuration file, update the mount file of the target container group in the file container based on the identification of the target mount file and the current mount file, and achieve dynamic mount.

Benefits of technology

Multiple files can be mounted dynamically without interrupting the operation of the container group, which improves mount efficiency and supports synchronous updates of multiple mount files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2024063100_03072025_PF_FP_ABST
    Figure IB2024063100_03072025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a file system mounting method and apparatus, a device, a storage medium, and a program product. The method can comprise: in response to an update operation executed on a list of files waiting for mounting of a target container group, determining a mounting configuration file corresponding to the target container group, wherein the mounting configuration file comprises identifiers of a plurality of target files waiting for mounting; determining identifiers of a plurality of currently mounted files corresponding to the target container group; and on the basis of the identifiers of the plurality of target files waiting for mounting and the identifiers of the plurality of currently mounted files, updating, in a file container corresponding to the target container group, mounted files in the target container group, wherein the files corresponding to the target container group have a mapping relationship with the files in the file container. In this way, the mounting efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] File System Mounting Method, Apparatus, Device, Storage Medium, and Program Product. This disclosure claims priority to Chinese patent application No. 202311855828.0, filed with the China Patent Office on December 28, 2023, entitled "File System Mounting Method, Apparatus, and Device," the entire contents of which are incorporated herein by reference. Technical Field: This disclosure relates to the field of computers, and more particularly to a file system mounting method, apparatus, device, storage medium, and program product. Background: A Kubernetes cluster may include multiple container groups (pods), each of which may include multiple containers. When creating a container, a persistent volume claim (PVC) and the corresponding persistent volume (PV) can be mounted to the container. A PV can be used to store datasets. In related art, when running an application in a pod, the dataset in the PV can be accessed. The dataset includes the data required to run the application. However, in the above approach, when a dataset needs to be replaced, the PVC needs to be updated, which in turn requires restarting the pod. This makes it impossible to dynamically mount data for running pods, resulting in low mounting efficiency. SUMMARY Various aspects of the present disclosure provide a file system mounting method, apparatus, device, storage medium, and program product for improving mounting efficiency. In a first aspect, an embodiment of the present disclosure provides a file system mounting method, comprising: in response to an update operation performed on a mount file list of a target container group, determining a mount configuration file corresponding to the target container group, the mount configuration file including identifiers of multiple target mount files; determining identifiers of multiple currently mounted files corresponding to the target container group; and updating the mount files of the target container group in a file container corresponding to the target container group based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files, wherein the files corresponding to the target container group have a mapping relationship with the files in the file container. In a possible implementation, updating the mount files of the target container group in a file container corresponding to the target container group based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files includes: determining an identifier of a file to be mounted and / or an identifier of a file to be unmounted based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files; and updating the mount files of the target container group in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted.In one possible embodiment, updating the mount file of the target container group in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted includes at least one of the following: creating the file to be mounted in the file container based on the identifier of the file to be mounted; or deleting the file to be unmounted from the file container based on the identifier of the file to be unmounted. In another possible embodiment, determining a mount configuration file corresponding to the target container group in response to an update operation performed on the mount file list of the target container group includes: monitoring the mount file list through a third-party component, the mount file list including multiple file identifiers; upon monitoring an update to the mount file list, determining whether there is an existing mount configuration file corresponding to the target container group; if no existing mount configuration file corresponding to the target container group exists, generating the mount configuration file based on the updated mount file list; and if an existing mount configuration file corresponding to the target container group exists, updating the existing mount configuration file based on the updated mount file list to obtain the mount configuration file, the mount configuration file including the file identifiers in the updated mount file list. In one possible implementation, before determining the identifiers of multiple currently mounted files corresponding to the target container group, the method includes: monitoring a mount configuration file corresponding to the target container group; monitoring the generation of the mount configuration file corresponding to the target container group, or monitoring an update of the mount configuration file corresponding to the target container group. In one possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file, and the server includes a third file; the second file includes at least one mounted file corresponding to the target container group; a soft link relationship is established between the first file and the third file, and the second file is mounted in the third file. The soft link relationship enables the target container group to access the at least one mounted file of the target container group through the first file, the third file, and the second file.In one possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file and a fourth file, and the server includes a third file; the fourth file includes at least one mounted file corresponding to the target container group; the fourth file is mounted on the second file; a binding relationship exists between the first file and the third file, and the second file is mounted on the third file; the binding relationship enables the target container group to access the at least one mounted file of the target container group through the first file, the third file, the second file, and the fourth file. In another possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file, and the server includes the third file; the second file includes at least one mounted file corresponding to the target container group; a recursive binding relationship exists between the first file and the third file, and the second file is mounted on the third file; the recursive binding relationship enables the target container group to recursively access the at least one mounted file of the target container group through the first file, the third file, and the second file. In a second aspect, embodiments of the present disclosure provide a file system mounting device, comprising: a response module, a determination module, and an update module. The response module is configured to, in response to an update operation performed on a mount file list of a target container group, determine a mount configuration file corresponding to the target container group, wherein the mount configuration file includes identifiers of multiple target mount files; the determination module is configured to determine identifiers of multiple currently mounted files corresponding to the target container group; and the update module is configured to update the mount files of the target container group in a file container corresponding to the target container group based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files, wherein the files corresponding to the target container group have a mapping relationship with the files in the file container. In one possible implementation, the update module is specifically configured to: determine identifiers of files to be mounted and / or identifiers of files to be unmounted based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files; and update the mount files of the target container group in the file container based on the identifiers of the files to be mounted and / or the identifiers of the files to be unmounted. In a possible implementation, the update module is specifically configured to: create the file to be mounted in the file container according to the identifier of the file to be mounted; and delete the file to be uninstalled in the file container according to the identifier of the file to be uninstalled.In one possible embodiment, the response module is specifically configured to: monitor the mount file list through a third-party component, where the mount file list includes multiple file identifiers; upon monitoring an update to the mount file list, determine whether an existing mount configuration file corresponding to the target container group exists; if no existing mount configuration file corresponding to the target container group exists, generate the mount configuration file based on the updated mount file list; if an existing mount configuration file corresponding to the target container group exists, update the existing mount configuration file based on the updated mount file list to obtain the mount configuration file, where the mount configuration file includes the file identifiers in the updated mount file list. In one possible embodiment, the device includes a monitoring module, configured to: monitor the mount configuration file corresponding to the target container group; and monitor the generation of the mount configuration file corresponding to the target container group or the update of the mount configuration file corresponding to the target container group. In one possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file, and the server includes a third file; the second file includes at least one mounted file corresponding to the target container group; a soft link relationship exists between the first file and the third file, and the second file is mounted on the third file; the soft link relationship enables the target container group to access the at least one mounted file of the target container group through the first file, the third file, and the second file. In another possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file and a fourth file, and the server includes the third file; the fourth file includes at least one mounted file corresponding to the target container group; the fourth file is mounted on the second file; a binding relationship exists between the first file and the third file, and the second file is mounted on the third file; the binding relationship enables the target container group to access the at least one mounted file of the target container group through the first file, the third file, the second file, and the fourth file.In one possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file, and the server includes a third file; the second file includes at least one mounted file corresponding to the target container group; a recursive binding relationship exists between the first file and the third file, and the second file is mounted on the third file. The recursive binding relationship enables the target container group to recursively access the at least one mounted file of the target container group through the first file, the third file, and the second file. In a third aspect, an embodiment of the present disclosure provides a server, comprising: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform any of the methods described in the first aspect. In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, the computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor performs any of the methods described in the first aspect. In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising a computer program. When executed by the processor, the computer program performs any of the methods described in the first aspect. Embodiments of the present disclosure provide a file system mounting method, apparatus, device, storage medium, and program product. In response to an update operation on a target container group's mount file list, a server can determine a mount configuration file corresponding to the target container group and the identifiers of multiple currently mounted files corresponding to the target container group. The server can then update the target container group's mount files in a file container corresponding to the target container group based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files in the mount configuration file. Files corresponding to the target container group have a mapping relationship with files in the file container. Because multiple mount files of the target container group can be updated in the file container and then synchronously mounted to the target container group, updating multiple mount files in the file container effectively updates the multiple mount files of the target container group. Files can be mounted without interrupting the operation of the target container group. Dynamic mounting of multiple mount files is supported, improving mounting efficiency compared to the prior art where PVCs only support mounting a single mount file. BRIEF DESCRIPTION OF THE DRAWINGS The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.In the accompanying drawings: Figure 1 is a schematic diagram of a scenario provided by an exemplary embodiment of the present disclosure; Figure 2 is a schematic flow diagram of a file system mounting method provided by an exemplary embodiment of the present disclosure; Figure 3 is a schematic flow diagram of another file mounting method provided by an exemplary embodiment of the present disclosure; Figure 4A is a schematic diagram of a mounting method provided by an exemplary embodiment of the present disclosure; Figure 4B is a schematic diagram of another mounting method provided by an exemplary embodiment of the present disclosure; Figure 4C is a schematic diagram of yet another mounting method provided by an exemplary embodiment of the present disclosure; Figure 5 is a schematic diagram of the process of a file system mounting method provided by an exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram of the structure of a file system mounting device provided by an exemplary embodiment of the present disclosure; Figure 7 is a schematic diagram of the structure of another file system mounting device provided by an exemplary embodiment of the present disclosure; Figure 8 is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present disclosure. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, storage, and display, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of the relevant data must comply with relevant laws, regulations, and standards, and corresponding operation portals are provided for users to choose to authorize or reject. To further clarify the objectives, technical solutions, and advantages of this disclosure, the following will provide a clear and complete description of the technical solutions of this disclosure in conjunction with specific embodiments and corresponding figures. Obviously, the described embodiments represent only a portion of the embodiments of this disclosure, and are not exhaustive. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. Figure 1 is a schematic diagram of a scenario provided by an exemplary embodiment of this disclosure. Referring to Figure 1 , there is a file container and a target container group. Files in the file container and files corresponding to the target container group have a mapping relationship. The file container includes identifiers of multiple currently mounted files, namely, identifier Mount1 for mount file 1 and identifier Mount2 for mount file 2. Since the files in the file container and the files corresponding to the target container group have a mapping relationship, the currently mounted files of the target container group are also mount file 1 and mount file 2. The target container group may include identifiers of the multiple currently mounted files, namely, identifier Mount1 for mount file 1 and identifier Mount2 for mount file 2. When the mount files of the target container group need to be updated, the mount files may be updated in the file container.Assume that in a file container, the current mount files, including mount file 1 and mount file 2, can be updated to mount file 2 and mount file 3. The updated file container may include the identifier Mount2 for mount file 2 and the identifier Mount3o for mount file 3. After the file container is updated, multiple mount files in the file container can be mapped to a target container group to update the mount files in the file container, that is, to update the mount files in the target container group. For example, mount file 2 and mount file 3 in the file container can be mapped to the target container group so that the mount files in the target container group include mount file 2 and mount file 3. The target container group may include the identifier Mount2 for mount file 2 and the identifier Mount3o for mount file 3. In related technologies, when running an application in a pod, it can access datasets in a PV. The datasets include the data required to run the application. However, in the above approach, when a dataset needs to be replaced, the PVC must be updated, which in turn requires restarting the pod. This prevents dynamic data mounting for running pods, resulting in low mounting efficiency. In the embodiments of the present disclosure, the target container group has a corresponding file container. Based on the identifiers of multiple target mount files and the identifiers of multiple currently mounted files, the target container group's mount files can be updated in the file container corresponding to the target container group. The files corresponding to the target container group have a mapping relationship with the files in the file container. Because multiple mount files of the target container group can be updated in the file container and then synchronously mounted to the target container group, updating multiple mount files in the file container effectively updates multiple mount files of the target container group, allowing files to be mounted without interrupting the operation of the target container group. Furthermore, this approach supports dynamic mounting of multiple mount files, improving mounting efficiency compared to the prior art where PVCs only support mounting a single mount file. The technical solution presented in this disclosure is described in detail below through specific embodiments. It should be noted that the following embodiments may exist independently or in combination. Identical or similar content will not be described repeatedly in different embodiments. FIG. 2 is a flowchart illustrating a file system mounting method provided by an exemplary embodiment of the present disclosure. Referring to FIG. 2 , the method may include:

[0002] S201: In response to an update operation performed on the mount file list of the target container group, determine the mount configuration file corresponding to the target container group. The execution entity of the embodiment of the present disclosure may be a server, or a file system mounting device provided in the server. The file system mounting device may be implemented via software or a combination of software and hardware. The file system mounting device may be a processor in the server. For ease of understanding, the following description uses the execution entity as an example. The mount file list may include identifiers, data sources, and configuration parameters of multiple mount files. One mount file includes one data source. Optionally, the identifier of the mount file may be represented by a directory. For example, if mount file 1 is in directory Mount1, the identifier of mount file 1 may be Mount1. Optionally, the identifier of the mount file may also be represented by the file name of the mount file. For example, if the name of mount file 1 is fileOOl, the identifier of mount file 1 can be fileOOl. When a user needs to add or delete a mount file for the target container group, the user can update the mount file list. In response to the update operation on the mount file list, the server can determine the mount configuration file corresponding to the target container group. The mount configuration file includes identifiers of multiple target mount files. Optionally, the mount configuration file can also include data sources, mount paths, and configuration parameters for the multiple target mount files. The mount configuration file can be a Fuse-configmap file. For example, if the target container group is pod-1, the mount file list includes the identifier of mount file 1 and the identifier of mount file 2. If the user deletes the identifier of mount file 1 and adds the identifier of mount file 3 in the mount file list, the mount configuration file 1 corresponding to pod-1 can be determined in response to the user's update operation on the mount file list. Mount configuration file 1 may include the identifiers of two target mount files, namely, the identifier Mount2 of mount file 2 and the identifier Mount3 of mount file 3.

[0003] 5202. Determine the identifiers of multiple currently mounted files corresponding to the target container group. The target container group may be a container group whose mounted files need to be updated. The target container group may have a corresponding file container. The file container may be a container in a user space file system (Fuse) pod. The identifiers of the multiple currently mounted files corresponding to the target container group are the same as the identifiers of the multiple currently mounted files in the file container. Optionally, the identifiers of the multiple currently mounted files may be determined in the file container, that is, the identifiers of the multiple currently mounted files corresponding to the target container group are determined. For example, the identifiers of the multiple currently mounted files may be determined in the file container, including the identifier Mount of mount file 1 and the identifier Mount2o of mount file 2.

[0004] S203. Update the mounted files of the target container group in the file container corresponding to the target container group based on the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files. The files corresponding to the target container group have a mapping relationship with the files in the file container; that is, the mounted files in the target container group and the file container are the same. In an optional embodiment, the mounted files of the target container group can be updated in the file container corresponding to the target container group based on the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files in the following manner: determine the identifier of the file to be mounted and / or the identifier of the file to be unmounted based on the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files; and update the mounted files of the target container group in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted. Since the files corresponding to the target container group have a mapping relationship with the files in the file container, after determining the identifier of the file to be mounted and / or the identifier of the file to be unmounted, the mounted files can be updated in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted, thereby updating the mounted files of the target container group. For example, if the identifiers of the multiple target mount files include the identifier Mount2 of mount file 2 and the identifier Mount3 of mount file 3, and the identifiers of the multiple currently mounted files include the identifier Mount of mount file 1 and the identifier Mount2 of mount file 2, then it can be determined that the identifier of the file to be mounted is Mount3, and the identifier of the file to be unmounted is Mount1. The server can perform an update in the file container based on the identifier Mount3 of the file to be mounted and the identifier Mount1 of the file to be unmounted, that is, unmount the mount file 1 corresponding to Mount1 and mount the mount file 3 corresponding to Mount3, so as to update the mount files of the target container group. In an embodiment of the present disclosure, in response to an update operation on the mount file list of a target container group, the server can determine the mount configuration file corresponding to the target container group and the identifiers of multiple currently mounted files corresponding to the target container group. Furthermore, based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files in the mount configuration file, the server can update the mount files of the target container group in the file container corresponding to the target container group. The files corresponding to the target container group and the files in the file container have a mapping relationship. Because the multiple mount files of the target container group can be updated in the file container and then synchronously mounted to the target container group, updating the multiple mount files in the file container effectively updates the multiple mount files of the target container group. Files can be mounted without interrupting the operation of the target container group. Furthermore, the server can support dynamic mounting of multiple mount files, improving mounting efficiency compared to the prior art where PVCs only support mounting a single mount file.The following describes the file system mounting method in detail based on the embodiment shown in FIG2 and in conjunction with FIG3. FIG3 is a flow chart of another file mounting method provided by an exemplary embodiment of the present disclosure. Referring to FIG3, the method may include:

[0005] S301. Monitor a mounted file list through a third-party component. The mounted file list includes multiple file identifiers. The multiple file identifiers are identifiers of multiple mounted files. Optionally, the third-party component may be a Thin Runtime Controller. Optionally, the server may be provided with the third-party component, and the mounted file list may be periodically monitored through the third-party component.

[0006] S302. When an update to the mount file list is detected, determine whether a mount configuration file corresponding to the target container group exists. When the mount information in the mount file list changes, determine whether a mount configuration file corresponding to the target container group already exists on the server. If not, execute step S303; if so, execute step S304. Mount information refers to information such as the mount file identifier, data source, and configuration parameters. For example, if the target container group is pod-1, and if the mount file list detects that the identifier Mount1 for mount file 1 has been deleted and the identifier Mount3 for mount file 3 has been added, it can be determined that the mount file list has been updated. It can then be determined whether mount configuration file 1 corresponding to pod-1 exists on the server. If not, execute step S303; if so, execute step S304.

[0007] S303. Generate a mount configuration file based on the updated mount file list. Since no existing mount configuration file corresponding to the target container group exists on the server, a mount configuration file can be generated based on the updated mount file list. The mount configuration file can include the files in the updated mount file list. For example, if the updated mount file list includes the identifier Mount2 for mount file 2 and the identifier Mount3 for mount file 3, then mount configuration file 1 can be generated based on the updated mount file list. Mount configuration file 1 can include the identifier Mount2 for mount file 2 and the identifier Mount3 for mount file 3.

[0008] S304. Update the existing mount configuration file based on the updated mount file list to obtain the mount configuration file. If an existing mount configuration file corresponding to the target container group exists on the server, the existing mount configuration file can be updated based on the updated mount file list to obtain the mount configuration file. For example, if the updated mount file list includes the identifier Mount2 of mount file 2 and the identifier Mount3 of mount file 3, and if the existing mount configuration file includes the identifier Mount1 of mount file 1 and the identifier Mount2 of mount file 2, the existing mount configuration file can be updated based on the updated mount file list. That is, the identifier Mount1 of mount file 1 is deleted from the existing mount configuration file and the identifier Mount3 of mount file 3 is added to obtain mount configuration file 1. Mount configuration file 1 can include the identifier Mount2 of mount file 2 and the identifier Mount3 of mount file 3.

[0009] 5305. Monitor the mount configuration file corresponding to the target container group. Optionally, the mount configuration file corresponding to the target container group can be monitored through a file container. For example, if the target container group 1 is pod-1 and the corresponding mount configuration file is mount configuration file 1, the mount configuration file corresponding to pod-1 can be monitored through a file container.

[0010] 5306. Monitoring the generation of a mount configuration file corresponding to the target container group, or monitoring the update of the mount configuration file corresponding to the target container group. Optionally, the mount configuration file includes an identity document (ID). When the mount configuration file is updated, the ID is also updated. If the mount configuration file corresponding to the target container group has just been generated, the generation of the mount configuration file corresponding to the target container group can be monitored through the file container. If monitoring the update of the resource ID in the mount configuration file, it can be determined that the mount configuration file corresponding to the target container group has been updated.

[0011] S307. Determine the identifiers of multiple currently mounted files corresponding to the target container group. Optionally, the identifiers of multiple currently mounted files may be determined in the file container, that is, the identifiers of multiple currently mounted files corresponding to the target container group may be determined. For example, if the target container group is pod-1, the identifiers of multiple currently mounted files corresponding to pod-1 may be determined in the file container, assuming that the identifiers include Mount 1 for mount file 1 and Mount 2 for mount file 2.

[0012] S308. Determine the identifier of the file to be mounted and / or the identifier of the file to be unmounted based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files. The identifiers of the multiple target mount files can be determined in the mount configuration file, and then the identifier of the file to be mounted and / or the identifier of the file to be unmounted can be determined based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files. For example, if the identifiers of the multiple target mount files include the identifier Mount2 of mount file 2 and the identifier Mount3 of mount file 3, and the identifiers of the multiple currently mounted files include the identifier Mount of mount file 1 and the identifier Mount2 of mount file 2, then the identifier of the file to be mounted can be determined to be Mount3, and the identifier of the file to be unmounted can be determined to be Mount1.

[0013] S309: Update the mount file of the target container group in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted. In an optional embodiment, the mount file of the target container group can be updated in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted in the following manner: create the file to be mounted in the file container based on the identifier of the file to be mounted; and delete the file to be unmounted from the file container based on the identifier of the file to be unmounted. For example, if the identifier of the file to be mounted is Mount3 and the identifier of the file to be unmounted is Mount1, then based on the identifier of the file to be mounted, a mount file 3 corresponding to Mount3 can be created in the file container; and based on the identifier of the file to be unmounted, a mount file 1 corresponding to Mount1 can be deleted from the file container, thereby updating the mount file of the target container group. Both the target container group and the file container can be deployed on a server. The target container group corresponds to a first file, which is stored on the server. The file container includes a second file, and the server includes a third file. The first file may be a file corresponding to the target container group. For example, the first file may be the / var / lib / kubelet / ... / mount / file. The second file may be a root file corresponding to multiple mount files. For example, the second file may be a Mount-Point file. The third file may be a file on the server. For example, the third file may be the / runtime-mnt / .. , / thin-fuse file. Optionally, after creating the file to be mounted and / or deleting the file to be uninstalled in the file container, the mount file in the file container may be synchronously mounted to the target container group to update the mount file of the target container group in the file container. Optionally, synchronously mounting the mount file in the file container to the target container group may include the following three methods: Method 1: Synchronously mounting the mount file of the target container group via a soft link based on the mount file in the file container. Figure 4A is a schematic diagram of a mounting method provided by an exemplary embodiment of the present disclosure. Referring to Figure 4A, a file container and a target container group may be deployed on the server. The target container group may correspond to a first file, which is stored on the server. The file container may include a second file, and the server may include a third file. The second file may be the root directory of at least one mounted file. The second file may include at least one mounted file corresponding to the target container group. For example, the second file may include two mounted files corresponding to the target container group, namely, mount file 2 and mount file 3.A soft link relationship exists between the first file and the third file, and the second file is mounted within the third file. The second file can be considered a root mount point and mounted within the third file. In the technical solution disclosed herein, by mounting the second file, at least one mount file in the second file can be mounted. Compared to supporting only one mount point for a PVC, this solution not only supports multiple mount points but also maintains consistency in the PVC definition. Optionally, a Container Storage Interface (CSI) plug-in can be used to link the third file to the first file via a symlink, establishing a soft link relationship between the first and third files. This soft link relationship allows the target container group to access at least one mount file in the target container group through the first, third, and second files. Multiple mount file identifiers can exist in the target container group. For example, the target container group can access the first file / var / lib / kubelet / ... / mount / and, based on the first file, access the third file / runtime-mnt / .. / thin-fuse. Furthermore, based on the third file, it can access the second file Mount-Point, and further access mount file 2 corresponding to Mount2 and mount file 3 corresponding to Mount3 under the second file. The target container group can have an identifier Mount2 corresponding to mount file 2 and an identifier Mount3 corresponding to mount file 3. In Method 1, no additional FUSE device overhead is introduced, and deleting the target container group only requires canceling the soft link, without affecting the mounted files in the file container. Method 2: Based on the mounted files in the file container, the target container group's mounted files are synchronously mounted using a bind mount. Figure 4B is a schematic diagram of another mounting method provided in an exemplary embodiment of the present disclosure. Referring to Figure 4B, a file container and a target container group can be deployed on the server. The target container group may correspond to a first file, which is stored on the server. The file container may include a second file and a fourth file, and the server may include a third file. The fourth file may be the / mnt file. The fourth file may be the root directory of at least one mounted file. The fourth file includes at least one mounted file corresponding to the target container group. For example, the fourth file may include two mounted files corresponding to the target container group, namely, mount file 2 and mount file 3. The fourth file may be mounted on the second file. The second file may be a view of the fourth file. The first file and the third file are bound to each other, and the second file is mounted on the third file.Optionally, a CSI plugin can be used to bind-mount the third file to the first file, creating a binding relationship between the first and third files. This binding relationship allows the target container group to access at least one mounted file in the target container group through the first, third, second, and fourth files. For example, the target container group can access the first file / var / lib / kubelet / ... / mount / and, based on the first file, access the third file / runtime-mnt / .. , / thin-fuse . Furthermore, based on the third file, it can access the second file Mount-Point , which in turn can access the fourth file / mnt , ultimately accessing mount file 2 corresponding to Mount2 and mount file 3 corresponding to Mount3 under the fourth file. The target container group can have the identifiers Mount2 corresponding to mount file 2 and Mount3 corresponding to mount file 3. In method 2, the second file can remain a FUSE file system, reusing existing CSI mount logic. Method 3: Synchronously mount the target container group's mounted files using a bind mount method based on the mounted files in the file container. Figure 4C is a schematic diagram of another mounting method provided by an exemplary embodiment of the present disclosure. Referring to Figure 4C, a file container and a target container group may be deployed on the server. The target container group may correspond to a first file, which is stored on the server. The file container includes a second file, which is stored on the server. The second file includes at least one mounted file corresponding to the target container group. A recursive binding relationship exists between the first file and the third file, with the second file mounted within the third file. The second file can be considered a root mount point and mounted within the third file. In the technical solution of the present disclosure, by mounting the second file, at least one mounted file in the second file can be mounted. Compared to PVCs that only support a single mount point, this method supports multiple mount points while maintaining the consistency of PVC definitions. Optionally, a CSI plugin can be used to recursively bind the third file to the first file, establishing a recursive binding relationship between the first and third files. The recursive binding relationship may be used for the target container group to recursively access at least one mounted file of the target container group through the first file, the third file, and the second file.For example, the target container group can access the first file / var / lib / kubelet / ... / mount / and, based on the first file, access the third file / runtime-mnt / .. / thin-fuse. Furthermore, based on the third file, it can access the second file Mount-Point, and further access mount file 2 corresponding to Mount2 and mount file 3 corresponding to Mount3 in the second file. The target container group can have the identifier Mount2 corresponding to mount file 2 and the identifier Mount3 corresponding to mount file 3. Method 3 eliminates the need for additional FUSEs and offers improved performance. Through these three methods, the mount files in the file container and the mount files in the target container group can be mapped and maintained consistent. In the technical solution disclosed herein, a third-party component monitors the mount file list, enabling timely detection of mount file changes and rapid updates of multiple mount files in the target container group. This ensures effectiveness and is scalable to different file systems. It also supports multiple mount files without adding new PVC objects. In an embodiment of the present disclosure, a server can monitor a mount file list through a third-party component. Upon detecting an update to the mount file list, the server determines whether an existing mount configuration file corresponding to the target container group exists. If not, the server can generate a mount configuration file based on the updated mount file list. If so, the server can update the existing mount configuration file based on the updated mount file list to obtain the mount configuration file. The server can monitor the mount configuration file corresponding to the target container group. Upon detecting the generation of a mount configuration file corresponding to the target container group or detecting an update to the mount configuration file corresponding to the target container group, the server can determine the identifiers of multiple currently mounted files corresponding to the target container group. The server can determine the identifiers of the files to be mounted and / or the identifiers of the files to be unmounted based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files, and update the mount files of the target container group in the file container based on the identifiers of the files to be mounted and / or the identifiers of the files to be unmounted. Because multiple mount files of the target container group can be updated in the file container and then synchronously mounted to the target container group, updating multiple mount files in the file container effectively updates multiple mount files of the target container group. Files can be mounted without interrupting the operation of the target container group. Furthermore, the second file can be considered the root directory of multiple mount files. By mounting the second file, multiple mount files can be dynamically mounted. This improves mounting efficiency compared to the prior art where PVCs only support mounting one mount file.The following describes the file system mounting method in detail, based on any of the above embodiments and in conjunction with Figure 5. Figure 5 is a schematic diagram of a file system mounting method provided by an exemplary embodiment of the present disclosure. Referring to Figure 5, the method includes steps ①, ②, ③, ④, and ⑤. In step ①, the mount file list can be updated. The pre-update mount file list may include the identifier Mount 1 for mount file 1, the identifier Mount 2 for mount file 2, and related mount information for mount files 1 and 2. The updated mount file list may include the identifier Mount 2 for mount file 2, the identifier Mount 3 for mount file 3, and related mount information for mount files 2 and 3. In step ②, the mount file list can be monitored by a third-party component. In step ③, upon detecting an update to the mount file list, a determination is made as to whether an existing mount configuration file corresponding to the target container group exists. If not, a mount configuration file can be generated based on the updated mount file list. If so, the existing mount configuration file can be updated based on the updated mount file list to obtain the mount configuration file. For example, mount configuration file 1 may include identifiers "Mount2" for mount file 2 and "Mount3" for mount file 3. In step 4, the mount configuration file corresponding to the target container group can be monitored through the file container. When the generation of the mount configuration file corresponding to the target container group is detected, or when the mount configuration file corresponding to the target container group is detected to be updated, a script can be executed to mount / unmount the file container according to the mount configuration file. Specifically, it can be determined in the file container that multiple currently mounted file identifiers include the identifier Mount1 of mount file 1 and the identifier Mount2 of mount file 2. It can be determined in the mount configuration file that multiple target mount file identifiers include the identifier Mount2 of mount file 2 and the identifier Mount3 of mount file 3. Therefore, based on the identifiers of the two target mount files and the identifiers of the two currently mounted files, it can be determined that the identifier of the file to be mounted is Mount3, and the identifier of the file to be unmounted is Mount1. Based on the identifier Mount3 of the file to be mounted, a file to be mounted, i.e., mount file 3 corresponding to Mount3, can be created in the file container. Based on the identifier Mount1 of the file to be unmounted, a file to be unmounted, i.e., mount file 1 corresponding to Mount1, can be deleted from the file container, so that the multiple mounted files in the file container are updated to mount file 2 and mount file 3. The second file in the file container can be mounted in a third file in the server.The second file may include at least one mount file corresponding to the target container group and be considered the root directory of the at least one mount file. In step 5, the CSI plugin may mount the third file to the first file via any of soft links, bind mounts, or recursive mounts, so that the target container group can access mount files 2 and 3 via the third and second files. Files corresponding to the target container group have a mapping relationship with files in the file container. Optionally, the third file may be unmounted from the first file via any of soft links, bind mounts, or recursive mounts. In this embodiment of the present disclosure, the server may monitor the mount file list through a third-party component. Upon detecting an update to the mount file list, the server determines whether there is an existing mount configuration file corresponding to the target container group. If not, the server may generate a mount configuration file based on the updated mount file list. If so, the server may update the existing mount configuration file based on the updated mount file list to obtain the mount configuration file. The server may monitor the mount configuration file corresponding to the target container group. Upon monitoring the generation of a mount configuration file corresponding to the target container group, or upon monitoring an update to the mount configuration file corresponding to the target container group, the identifiers of multiple currently mounted files corresponding to the target container group can be determined. Based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files, the server can determine the identifier of the file to be mounted and / or the identifier of the file to be unmounted. Based on the identifiers of the file to be mounted and / or the identifier of the file to be unmounted, the server updates the mount files of the target container group in the file container and synchronously mounts them to the target container group. Because multiple mount files of the target container group can be updated in the file container and then synchronously mounted to the target container group, updating multiple mount files in the file container effectively updates multiple mount files of the target container group, allowing files to be mounted without interrupting the operation of the target container group. Furthermore, the second file can be treated as the root directory of the multiple mount files. By mounting the second file, multiple mount files can be dynamically mounted. This improves mounting efficiency compared to the prior art PVC that only supports mounting a single mount file. Figure 6 is a schematic structural diagram of a file system mounting device provided by an exemplary embodiment of the present disclosure.Referring to FIG. 6 , the file system mounting device 10 includes a response module 11, a determination module 12, and an update module 13. The response module 11 is configured to, in response to an update operation performed on the mount file list of a target container group, determine a mount configuration file corresponding to the target container group, wherein the mount configuration file includes identifiers of multiple target mount files. The determination module 12 is configured to determine identifiers of multiple currently mounted files corresponding to the target container group. The update module 13 is configured to update the mount files of the target container group in a file container corresponding to the target container group based on the identifiers of the multiple target mount files and the identifiers of the multiple currently mounted files. Files corresponding to the target container group have a mapping relationship with files in the file container. The file system mounting device provided in the embodiments of the present disclosure can implement the technical solutions shown in the above-mentioned method embodiments. The implementation principles and beneficial effects thereof are similar and are not further described here. In one possible implementation, the update module 13 is specifically configured to: determine an identifier of a file to be mounted and / or an identifier of a file to be unmounted based on the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files; and update the mounted files of the target container group in the file container based on the identifier of the file to be mounted and / or the identifier of the file to be unmounted. In another possible implementation, the update module 13 is specifically configured to: create the file to be mounted in the file container based on the identifier of the file to be mounted; and delete the file to be unmounted from the file container based on the identifier of the file to be unmounted. In one possible implementation, the response module 11 is specifically configured to: monitor the mount file list through a third-party component, where the mount file list includes multiple file identifiers; upon monitoring an update to the mount file list, determine whether an existing mount configuration file corresponding to the target container group exists; if no existing mount configuration file corresponding to the target container group exists, generate the mount configuration file based on the updated mount file list; and if an existing mount configuration file corresponding to the target container group exists, update the existing mount configuration file based on the updated mount file list to obtain the mount configuration file, where the mount configuration file includes the file identifiers in the updated mount file list. The file system mounting device provided in the embodiments of the present disclosure can implement the technical solutions shown in the above-mentioned method embodiments, and its implementation principles and beneficial effects are similar and will not be further described here. Figure 7 is a schematic structural diagram of another file system mounting device provided in an exemplary embodiment of the present disclosure.Referring to FIG. 7 , based on the embodiment shown in FIG. 6 , the file system mounting device 10 further includes a monitoring module 14 configured to monitor the mount configuration file corresponding to the target container group; monitor the generation of the mount configuration file corresponding to the target container group, or monitor the update of the mount configuration file corresponding to the target container group. In one possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file, and the server includes a third file; the second file includes at least one mount file corresponding to the target container group; a soft link relationship is established between the first file and the third file, and the second file is mounted on the third file. The soft link relationship enables the target container group to access the at least one mount file of the target container group through the first file, the third file, and the second file. In one possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file and a fourth file, and the server includes a third file; the fourth file includes at least one mounted file corresponding to the target container group; the fourth file is mounted on the second file; a binding relationship exists between the first file and the third file, and the second file is mounted on the third file; the binding relationship enables the target container group to access the at least one mounted file of the target container group through the first file, the third file, the second file, and the fourth file. In another possible implementation, the target container group and the file container are deployed on a server; the target container group corresponds to a first file, the file container includes a second file, and the server includes the third file; the second file includes at least one mounted file corresponding to the target container group; a recursive binding relationship exists between the first file and the third file, and the second file is mounted on the third file; the recursive binding relationship enables the target container group to recursively access the at least one mounted file of the target container group through the first file, the third file, and the second file. The file system mounting device provided in the embodiments of the present disclosure can implement the technical solutions shown in the above-described method embodiments. Its implementation principles and beneficial effects are similar and will not be further described here. The exemplary embodiments of the present disclosure provide a schematic diagram of the structure of a server. See FIG8 . The server 20 may include a processor 21 and a memory 22.Illustratively, the processor 21 and the memory 22 are interconnected via a bus 23. The memory 22 stores computer-executable instructions; the processor 21 executes the computer-executable instructions stored in the memory 22, causing the processor 21 to perform the method described in the above method embodiment. The server shown in FIG8 may be a server in a Kubernetes cluster. Accordingly, embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above method embodiment. Accordingly, embodiments of the present disclosure may also provide a computer program product, including a computer program. When executed by a processor, the computer program can implement the method described in the above method embodiment. Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process flow and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that execution of the instructions by the processor of the computer or other programmable data processing device produces means for implementing the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams. These computer program instructions can also be stored in a computer-readable memory capable of directing the computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means for implementing the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing the computer or other programmable device to execute a series of operational steps to produce a computer-implemented process. The instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks in the block diagrams. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-volatile memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of a computer-readable medium. Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can implement information storage using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves. It should also be noted that the terms "comprises," "comprising," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements may include not only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus. In the absence of further limitations, elements defined by the phrase "comprising a..." do not preclude the presence of other identical elements in the process, method, product, or device comprising the elements. The foregoing description is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Persons skilled in the art will readily appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, improvements, and the like made within the spirit and principles of the present disclosure are intended to be encompassed by the claims of the present disclosure.

Claims

Claims 1. A method for mounting a file system, wherein, Including: In response to an update operation performed on the mounted file list of the target container group, determining the mounted configuration file corresponding to the target container group, where the mounted configuration file includes identifiers of multiple target mounted files; determining identifiers of multiple currently mounted files corresponding to the target container group; and updating the mounted files of the target container group in the file container corresponding to the target container group according to the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files, where the files corresponding to the target container group and the files in the file container have a mapping relationship.

2. The method according to claim 1, wherein Updating the mounted files of the target container group in the file container corresponding to the target container group according to the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files includes: determining identifiers of files to be mounted and / or identifiers of files to be unmounted according to the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files; and updating the mounted files of the target container group in the file container according to the identifiers of the files to be mounted and / or the identifiers of the files to be unmounted.

3. The method according to claim 2, wherein Updating the mounted files of the target container group in the file container according to the identifiers of the files to be mounted and / or the identifiers of the files to be unmounted includes at least one of the following: creating the file to be mounted in the file container according to the identifier of the file to be mounted; and deleting the file to be unmounted in the file container according to the identifier of the file to be unmounted.

4. The method according to any one of claims 1 to 3, wherein In response to an update operation performed on the mounted file list of the target container group, determining the mounted configuration file corresponding to the target container group includes: listening to the mounted file list through a third-party component, where the mounted file list includes multiple file identifiers; when it is monitored that the mounted file list is updated, determining whether there is an existing mounted configuration file corresponding to the target container group; if there is no existing mounted configuration file corresponding to the target container group, generating the mounted configuration file according to the updated mounted file list; if there is an existing mounted configuration file corresponding to the target container group, updating the existing mounted configuration file according to the updated mounted file list to obtain the mounted configuration file, where the mounted configuration file includes the file identifiers in the updated mounted file list.

5. The method according to any one of claims 1-4, wherein Before determining the identifiers of multiple currently mounted files corresponding to the target container group, it includes: listening to the mounted configuration file corresponding to the target container group; monitoring that the mounted configuration file corresponding to the target container group is generated, or monitoring that the mounted configuration file corresponding to the target container group is updated.

6. The method according to any one of claims 1-5, wherein The target container group and the file container part Deployed on the server; the target container group corresponds to a first file, the file container includes a second file, and the server includes a third file; wherein, the second file includes at least one mounted file corresponding to the target container group; there is a soft link relationship between the first file and the third file, the second file is mounted in the third file, and the soft link relationship is used for the target container group to access the at least one mounted file of the target container group through the first file, the third file, and the second file.

7. The method according to any one of claims 1-5, wherein The target container group and the file container are deployed on the server; the target container group corresponds to a first file, the file container includes a second file and a fourth file, and the server includes a third file; wherein, the fourth file includes at least one mounted file corresponding to the target container group; the fourth file is mounted in the second file; there is a binding relationship between the first file and the third file, the second file is mounted in the third file, and the binding relationship is used for the target container group to access the at least one mounted file of the target container group through the first file, the third file, the second file, and the fourth file.

8. The method according to any one of claims 1-5, wherein The target container group and the file container are deployed on the server; the target container group corresponds to a first file, the file container includes a second file, and the server includes a third file; wherein, the second file includes at least one mounted file corresponding to the target container group; there is a recursive binding relationship between the first file and the third file, the second file is mounted in the third file, and the recursive binding relationship is used for the target container group to recursively access the at least one mounted file of the target container group through the first file, the third file, and the second file.

9. A file system mounting device, wherein, Including: A response module, a determination module, and an update module. Among them, the response module is used to determine the mounted configuration file corresponding to the target container group in response to an update operation performed on the mounted file list of the target container group. The mounted configuration file includes the identifiers of multiple target mounted files; the determination module is used to determine the identifiers of multiple currently mounted files corresponding to the target container group; the update module is used to update the mounted files of the target container group in the file container corresponding to the target container group according to the identifiers of the multiple target mounted files and the identifiers of the multiple currently mounted files. The file corresponding to the target container group has a mapping relationship with the files in the file container.

10. A server, wherein, Including: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the server to perform the method according to any one of claims 1-8.

11. A computer-readable storage medium, wherein, Computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the method according to any one of claims 1-8 is implemented.

12. A computer program product comprising a computer program, wherein, When the computer program is executed by the processor, the method according to any one of claims 1-8 is implemented.

Citation Information

Patent Citations

  • Container configuration updating method and device, computer equipment and storage medium

    CN111651178A

  • File system sharing method and device, electronic equipment and storage medium

    CN116150116A

  • Dynamic updating method and system for container configuration file

    CN117170709A