Volume mounting and access method, device, and storage medium

MYPI2025005921A0Undetermined Publication Date: 2024-10-03CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
MYPI2025005921
Authority / Receiving Office
MY · MY
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-03
Filing Date
2024-04-02
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In cloud computing scenarios, how to use storage volumes to allow containerized applications to use the host's storage system as a storage facility for data sharing and persistence is a technical problem that cannot be effectively solved by existing technologies.

Method used

Use the subtree mounting method to mount the storage volume to the host directory tree, so that the application instance can access the storage volume through the root mount point on the host directory tree, realize data sharing and persistent storage, and use it in multiple application instances Sharing cache space between them saves host memory resources.

Benefits of technology

It realizes data sharing and persistent storage using the host storage system through storage volumes, saves host memory resources, and maintains independently mounted information statistics and permission control logic at the system level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure PI2025005921_DRAWING_001
    Figure PI2025005921_DRAWING_001
  • Figure PI2025005921_DRAWING_002
    Figure PI2025005921_DRAWING_002
  • Figure PI2025005921_DRAWING_003
    Figure PI2025005921_DRAWING_003
Patent Text Reader

Abstract

Embodiments of the present application provide a volume mounting and access method, a device, and a storage medium. In the embodiments of the present application, for a volume that is bound to an application instance, the volume is mounted to a host machine directory tree in a sub-tree mounting manner. That is, the host machine directory tree includes a root mount point of the volume and a child mount point that points to the root mount point, so that the application instance can access the volume through the root mount point on the host machine directory tree, thereby achieving the purpose of using, by means of the volume, a storage system of the host machine as a storage facility for realizing data sharing and persistence of the application instance. Further, in the manner of mounting the volume by using a sub-tree, when the volume is bound to a plurality of application instances, the plurality of application instances all access the volume by using the root mount point, so that a same cache space can be shared, thereby saving memory resources of the host machine. Fig 1.
Need to check novelty before this filing date? Find Prior Art

Description

Storage volume mounting and access method, device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 3, 2023, with application number CN202310369529.X and invention name “Storage volume mounting and access method, device and storage medium”, the entire contents of which are incorporated by reference into this application.

[0002] Storage volume mounting and access method, device and storage medium Technical Field

[0003] The present application relates to the field of cloud storage technology, and in particular to a storage volume mounting and access method, device, and storage medium. Background Art

[0004] In cloud computing scenarios, containerized application deployment has become the mainstream deployment method and a crucial component of the cloud-native computing revolution. Numerous applications are undergoing containerization. To enable persistent data storage in containerized applications, the concept of storage volumes has been introduced. This provides a foundation for containerized applications to use the host's storage system as a shared and persistent storage facility. However, how to enable containerized applications to use the host's storage system as a shared and persistent storage facility through storage volumes is a major technical challenge facing the cloud computing field.

[0005] Summary of the Invention

[0006] Multiple aspects of the present application provide a storage volume mounting and access method, device and storage medium for mounting storage volumes to a host directory tree in a subtree mounting manner, so that application instances can use the host storage system as a storage facility for data sharing and persistence through storage volumes.

[0007] An embodiment of the present application provides a storage volume mounting method, comprising: determining a target storage volume bound to a target application instance and to be mounted on a host directory tree, wherein the host directory tree is a directory tree of the host where the target application instance is located; if the host directory tree contains a root mount point of the target storage volume, creating a sub-mount point pointing to the root mount point in the host directory tree for the target application instance; and mounting the target storage volume on the root mount point in a subtree mounting manner based on the sub-mount point, so that the target application instance can access the target storage volume through the root mount point.

[0008] An embodiment of the present application also provides a storage volume access method, including: responding to an access operation of a target application instance to a target storage volume, wherein the target storage volume is a storage volume bound to the target application instance and mounted on a host directory tree; generating an access path to the target storage volume based on a root mount point and a sub-mount point of the target storage volume on the host directory tree; and performing a corresponding type of access operation on the target storage volume based on the access path.

[0009] An embodiment of the present application also provides a computer device, comprising: a memory and a processor; the memory is used to store a computer program; the processor is coupled to the memory, and is used to execute the computer program to execute the steps in the storage volume mounting method and / or storage volume access method provided in the embodiment of the present application.

[0010] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the storage volume mounting method and / or storage volume access method provided in the embodiment of the present application.

[0011] In an embodiment of the present application, for the storage volume bound to the application instance, the storage volume is mounted on the host directory tree in a subtree mount manner, that is, the host directory tree includes the root mount point of the storage volume and a submount point pointing to the root mount point, so that the application instance can access the storage volume through the root mount point on the host directory tree, thereby achieving the purpose of using the host's storage system as a storage facility for application instances to realize data sharing and persistence through the storage volume.

[0012] Furthermore, by mounting the storage volume in a subtree, when the storage volume is bound to multiple application instances, all application instances access the storage volume through the root mount point, can share the same cache space, and save the host's memory resources.

[0013] Furthermore, the subtree mount method is a mount operation natively supported by the host operating system, and can maintain the same logic and user experience as independent mount in terms of system-level information statistics and mount permission control. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0015] FIG1 is a flow chart of a storage volume mounting method provided in an embodiment of the present application;

[0016] FIG2 is a flowchart of another storage volume mounting method provided in an embodiment of the present application;

[0017] FIG3 is a flowchart of a storage volume access method provided in an embodiment of the present application;

[0018] FIG4 is a flowchart of another storage volume access method provided in an embodiment of the present application;

[0019] FIG5 is a schematic diagram of a scenario of mounting a PV in a K8s cluster provided in an embodiment of the present application;

[0020] FIG6 is a schematic structural diagram of a storage volume mounting device provided in an embodiment of the present application;

[0021] FIG7 is a schematic diagram of the structure of a storage volume access device provided in an embodiment of the present application;

[0022] FIG8 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0024] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the access relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of the present application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship. In addition, in the embodiments of the present application, "first", "second", "third", etc. are only used to distinguish the contents of different objects, and have no other special meanings such as order and quantity.

[0025] The following are some explanations of the terms involved in the embodiments of this application:

[0026] Kubernetes (K8s for short) cluster: is an open source container orchestration management platform for automatically deploying, scaling, and managing containerized applications.

[0027] Application instance: It is the smallest unit of application program (referred to as application) in a cloud computing environment. Applications usually run on one or more application instances. Applications can have multiple deployment versions, and different application instances can run different versions of applications. The instance specifications of an application instance can be defined, for example, by the number of central processing unit (CPU) cores and / or memory capacity. For example, one instance specification has an 8-core CPU and 8GB (Gigabyte) of memory; another instance specification has a 4-core CPU and 4GB (Gigabyte) of memory.

[0028] Host directory tree: refers to the directory tree at the operating system level of the host machine. This embodiment does not limit the operating system used by the host machine, for example, including but not limited to: Linux or Unix. Taking the directory tree of the Linux operating system as an example, everything is a file under Linux. All files in the Linux operating system are stored in the file system. They are organized into an inverted directory tree, which is also called the file system hierarchy. This tree is inverted because the root is at the top of the hierarchy, and branches of directories and subdirectories extend from the bottom of the root. The Linux root directory ( / ) contains many subdirectories (called first-level directories), and each first-level directory also contains many subdirectories (called second-level directories).

[0029] A volume is an abstract concept for storage systems such as local file storage systems and distributed file storage systems used by a host. At its core, a volume is a directory that may contain data and can be accessed by application instances. Examples of volume types include, but are not limited to, temporary storage volumes for data caching or temporary storage, and Network File Systems (NFS).

[0030] A Persistent Volume (PV) is an abstraction of storage resources in a Kubernetes cluster and a specific implementation of a storage volume. A PV is a storage resource defined in a Kubernetes cluster that can be used by containerized applications. PVs are created and configured by administrators, managed through a plug-in mechanism, and accessed and used by container groups (Pods).

[0031] Pod (container group): A collection of containers in running state on a K8s cluster, which is a specific implementation of an application instance.

[0032] Mount point: When you want to access a file in a storage volume, you need to associate it with a directory in the host directory tree. This association operation is called mounting, and this directory is the mount point. In other words, the mount point is the location of the file in the directory tree.

[0033] In a cloud computing scenario, how to enable containerized applications to use the host's storage system as a storage facility for data sharing and persistence through storage volumes is a major technical problem faced by the field of cloud computing. To this end, an embodiment of the present application provides a storage volume mounting and access method, device, and storage medium. In an embodiment of the present application, for a storage volume bound to an application instance, the storage volume is mounted on a host directory tree in a subtree mounting manner, that is, the host directory tree includes a root mount point of the storage volume and a submount point pointing to the root mount point, so that the application instance can access the storage volume through the root mount point on the host directory tree, so that the application instance can use the host's storage system as a storage facility for data sharing and persistence through the storage volume.

[0034] Furthermore, by mounting the storage volume in a subtree, when the storage volume is bound to multiple application instances, multiple application instances all access the storage volume through the root mount point, can share the same cache space, and save the host's memory resources.

[0035] Furthermore, subtree mounts are natively supported by the host operating system, maintaining the same logic and user experience as independent mounts in terms of system-level information statistics and mount permission control. For example, when the same storage volume is bound to multiple application instances, some application instances can mount the storage volume in read-write mode, while others can mount the storage volume in read-only mode. For another example, the operating system can perceive each mount of the same storage volume in the host directory tree, facilitating the management and maintenance of storage volume mounts.

[0036] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.

[0037] FIG1 is a flow chart of a storage volume mounting method provided in an embodiment of the present application. Referring to FIG1 , the method may include the following steps:

[0038] 100. Determine a target storage volume bound to the target application instance and to be mounted on a host directory tree. The host directory tree is a directory tree of the host where the target application instance is located.

[0039] 101. Determine whether the host directory tree contains the root mount point of the target storage volume; if the judgment result is yes, that is, the host directory tree contains the root mount point of the target storage volume, execute step 102; if the judgment result is no, that is, the host directory tree does not contain the root mount point of the target storage volume, execute step 103.

[0040] 102 . Create a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, and execute step 104 .

[0041] 103 . Create a root mount point of the target storage volume in the host directory tree, and create a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, and then execute step 104 .

[0042] 104. Mount the target storage volume to the root mount point in a subtree mount manner based on the submount point, so that the target application instance can access the target storage volume through the root mount point.

[0043] In this embodiment, the target application instance is hosted on a host machine, which can host one or more application instances, and the target application instance can be any application instance hosted on the host machine. Furthermore, the target application instance of this embodiment can be a containerized application instance, such as a container or a container group (Pod). From the perspective of the function implemented by the target application instance, the target application instance can be, but is not limited to: a load balancing instance, a database instance, a cloud server instance, etc. The host machine can be any computer device in a broad sense that can host the target application instance, such as a terminal device such as a laptop computer or a mobile phone, or a server device such as a traditional server, a cloud server, or a server cluster. In this embodiment, the host machine is mounted with a physical storage system, such as a block storage device, a disk, a network attached storage (NAS), etc., and the physical storage system is managed through a host directory tree. The host directory tree is a directory tree on the host machine used to manage the host machine's physical storage system. Furthermore, NAS can include NFS (Network File System).

[0044] In this embodiment, to facilitate the sharing and persistence of data generated by application instances, the concept of storage volumes is adopted. Storage volumes are storage spaces defined on the physical storage system mounted on the host machine. Storage volumes are independent of the lifecycle of the application instance, so the data stored in them can continue to be used after the application instance is restarted or rebuilt. In this embodiment, the implementation method of storage volumes is not limited. For example, it can be a PV, but it is not limited to this. The user can pre-declare which storage volume or volumes the target application instance needs to be bound to. Based on the user's pre-declaration, one or more storage volumes can be bound to the target application instance. Any storage volume can be bound to one or more application instances on the host machine. For ease of description, any storage volume bound to the target application instance is referred to as the target storage volume, and the storage volume mounting process provided in the embodiment of the present application is described using the target storage volume as an example. In order to facilitate the target application instance to use the host machine's physical storage system as a storage facility for data sharing and persistence through storage volumes, the target storage volume bound to the target application instance can be mounted on the host machine's directory tree (which can be simply referred to as mounting the target storage volume), that is, an association relationship is established between the storage volume and a directory on the host machine's directory tree. In this way, when the target application instance writes data to the target storage volume, the data will be written to the corresponding directory of the physical storage system on the host machine that has established an association with the target storage volume, achieving data persistence. Furthermore, when other application instances are bound to the same target storage volume as the target application instance, data can be shared between the other application instances and the target application instance.

[0045] In this embodiment, when mounting the target storage volume, unlike the traditional storage volume mounting method, neither an independent mounting method nor a root directory mounting method is adopted, but a subtree mounting method is adopted to mount the target storage volume to the host directory tree.

[0046] Independent mounting means that for the same storage volume, when bound to different application instances, each application instance mounts the same volume independently. From the perspective of the host operating system, each application instance mounts the same volume as a separate directory tree, completely isolated from each other and sharing no resources. In this independent mounting mode, cached data for the same storage volume must be stored multiple times for different application instances, wasting the host's cache resources.

[0047] Among them, the root directory mounting method means that for the same storage volume, it is mounted to the root directory of the host directory tree when it is mounted for the first time, and the unique mount point is directly reused by other application instances that subsequently bind to the storage volume in a link-pointing manner. Under the root directory mounting method, because different application instances reuse the same mount point, different application instances can only use the same mount permissions, either read-only or read-write, which is not flexible in terms of mount permission control. In addition, from the perspective of the host operating system, this method is equivalent to mounting only once, so the operating system cannot understand the mount information of the storage volume for different application instances, which will cause inconvenience in the management and maintenance of the storage volume.

[0048] The subtree mounting method adopted in this embodiment means that for the same storage volume, taking the target storage volume as an example, a root mount point is created for the target storage volume on the host directory tree. In addition, for different application instances bound to the target storage volume, sub-mount points pointing to the root mount point are created for the target storage volume on the host directory tree so that the target storage volume can be accessed through the root mount point. In the subtree mounting method, a root mount point of the target storage volume and at least one sub-mount point pointing to the root mount point will appear on the host directory tree. The root mount point and at least one sub-mount point form a mount directory tree corresponding to the target storage volume, and resources are allocated and managed for the target storage volume at the granularity of the mount directory tree. The number of sub-mount points depends on the number of application instances bound to the target storage volume.

[0049] In the subtree mount method, different application instances must access the target storage volume through the root mount point. The root mount point can establish an association relationship between different application instances bound to the same target storage volume, realizing resource sharing. The cache data of the target storage volume only needs to be stored in one copy, which helps to save the host machine's cache resources. In addition, different application instances bound to the same target storage volume have their own sub-mount points instead of completely reusing the same mount point. Different application instances are allowed to mount with different mount permissions, that is, some application instances are allowed to mount the target storage volume in read-only mode, while some application instances are allowed to mount the target storage volume in read-write mode, which has a high degree of flexibility in terms of mount permission control.

[0050] In this embodiment, there is no restriction on the mounting timing of the target storage volume, and it can be any time before the target application instance accesses the target storage volume. In the cluster where the host machine is located, there is a master node (Master) that manages each application instance. The master node can monitor whether a new application instance is created in the computing cluster, whether the application instance is bound to a storage volume and other information, so as to be responsible for scheduling the application instance to a computing node in the cluster. The computing node to which the application instance is scheduled is the host machine that hosts the application instance. In this scenario, the master node can also send a mount instruction to the host machine that hosts the application instance to instruct the host machine to perform a mount operation for the storage volume bound to the application instance. Based on the foregoing, the mounting timing for mounting the target storage volume on the host machine directory tree includes but is not limited to the following situations:

[0051] For example, when receiving a mount instruction sent by a master node with management functions in the same computing cluster as the host machine, a mount operation can be performed to mount the target storage volume; wherein the mount instruction instructs the host machine to mount the target storage volume bound to the target application instance.

[0052] For example, when the target application instance is detected to be scheduled to the host, the host directory tree is automatically created and persisted for the target application instance, and the target storage volume is mounted. Persistence of the host directory tree refers to the process of associating the host directory tree with the physical storage system.

[0053] For another example, when it is detected that the target application instance is created on the host machine, but the target storage volume bound to the target application instance has not been mounted on the host machine directory tree, a mount operation is performed to mount the target storage volume.

[0054] For another example, when the target application instance initiates a data access request to the target storage volume, if it is found that the target storage volume has not been mounted on the host directory tree, a mount operation is performed to mount the target storage volume.

[0055] In this embodiment, when mounting the target storage volume on the host directory tree, the mount command supported by the host operating system can be called, and the host operating system performs the mount operation, but it is not limited to this. For example, a storage volume mount process can also be deployed on the host, and the storage volume mount process performs the storage volume mount operation provided by this embodiment. Wherein, regardless of whether the execution subject is the operating system or the storage volume mount process, when performing the mount operation, it is first determined whether the host directory tree contains the root mount point of the target storage volume. Wherein, the target storage volume will be associated with a directory on the host directory tree that is unrelated to the application instance bound to the target storage volume. This directory is called the root mount point of the target storage volume on the host directory tree. Wherein, the directory serving as the root mount point can be pre-declared, specified or configured by the user.

[0056] Optionally, in order to quickly and accurately determine whether the host directory tree contains the root mount point of the target storage volume, a mount list can be maintained for the host directory tree, and the volume identifier of the storage volume mounted on the host directory tree and its root mount point can be recorded in the mount list, that is, the mount list records the mapping relationship between the storage volume mounted on the host directory tree and the root mount point. Therefore, when determining whether the host directory tree contains the root mount point of the target storage volume, a match can be made in the mount list corresponding to the host directory tree based on the identifier of the target storage volume; if the identifier of the target storage volume is matched, the root mount point corresponding to the identifier of the target storage volume is used as the root mount point of the target storage volume; if the identifier of the target storage volume is not matched, it is determined that the host directory tree does not contain the root mount point of the target storage volume.

[0057] In this embodiment, for each mount of the target storage volume, a child mount point can be created for the target storage volume on the host directory tree for this mount. The child mount point is a child node of the root mount point, and the root mount point is the parent node of the child mount point, thereby achieving the target storage volume being mounted on the root mount point in a subtree mount manner. In actual applications, the target storage volume can be bound to one or more application instances. When the target storage volume is bound to an application instance, a root mount point of the target storage volume and a child mount point pointing to the root mount point will appear on the host directory tree. At this time, the target storage volume corresponds to a mount directory tree with one child mount point. Over time, when the target storage volume is bound to multiple application instances, a root mount point of the target storage volume and multiple child mount points pointing to the root mount point will appear on the host directory tree. At this time, the target storage volume corresponds to a mount directory tree with multiple child mount points.

[0058] Based on the above, if the host directory tree contains the root mount point of the target storage volume, a sub-mount point pointing to the root mount point can be directly created in the host directory tree for the target application instance; then, based on the sub-mount point, the target storage volume is mounted to the root mount point in a subtree mount manner, so that the target application instance can access the target storage volume through the root mount point. If the host directory tree does not contain the root mount point of the target storage volume, before creating the sub-mount point, create the root mount point of the target storage volume in the host directory tree; then, for the target application instance, create a sub-mount point pointing to the root mount point in the host directory tree; then, based on the sub-mount point, the target storage volume is mounted to the root mount point in a subtree mount manner, so that the target application instance can access the target storage volume through the root mount point.

[0059] Optionally, the user can pre-configure the directory location of the target application instance in the host directory tree by means of a configuration file. Based on this, when creating a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, the directory location corresponding to the target application instance in the host directory tree can be obtained from the configuration file corresponding to the target application instance; the directory location is used as the sub-mount point, and a pointing relationship is established between the sub-mount point and the root mount point. For example, when establishing a pointing relationship between the sub-mount point and the root mount point, the root mount point can be used as the parent mount point of the sub-mount point, and the identifier of the root mount point can be recorded in the attribute information of the sub-mount point.

[0060] In this embodiment, a sub-mount point can be understood as a directory one level below the root mount point, and a root mount point can be understood as a directory one level above the sub-mount point. A pointing relationship exists between the sub-mount point and the root mount point, meaning the sub-mount point and the root mount point are bound. When the pointing relationship no longer exists, the sub-mount point and the root mount point are unbound.

[0061] Optionally, to facilitate the maintenance and management of storage volume mount operations, after the target storage volume is mounted to the root mount point in a subtree mount manner based on the submount point, the number of references to the root mount point can be increased according to a set number of update steps, where the number of update steps is a positive integer. The number of update steps can be flexibly set according to actual application requirements, such as 1, 2, 3, etc. The number of references to the root mount point reflects the number of times the target storage volume has been mounted. Taking a number update step of 1 as an example, each time the target storage volume is mounted, the number of references to the corresponding root mount point increases by 1.

[0062] Optionally, in order to facilitate the maintenance and management of storage volume mounting operations, when the target application instance is destroyed from the host machine, the step size can be updated according to the number of times, and the number of references to the root mount point can be reduced; and when the number of references to the root mount point is the preset initial value, the root mount point can be uninstalled from the host machine directory tree.

[0063] Specifically, when the target application instance is destroyed from the host machine, the corresponding sub-mount point will also be destroyed, that is, the corresponding sub-mount point will be deleted from the host machine directory tree, and the corresponding sub-mount point will be unbound from the root mount point. In addition, when the target application instance is destroyed from the host machine, it is necessary to update the step size according to the number of times to reduce the number of references to the root mount point. Taking the number update step size of 1 as an example, when the target application instance is destroyed, the number of references to the corresponding root mount point is reduced by 1. As the application instances bound to the target storage volume are continuously destroyed, the number of references to the root mount point will continue to be reduced until it reaches the preset initial value. If the number of references to the root mount point is reduced to the preset initial value, the root mount point is uninstalled from the host machine directory tree, that is, the root mount point of the target storage volume no longer exists on the host machine directory tree. Among them, the preset initial value is flexibly set as needed, such as 0, 1, 2, etc.

[0064] In an embodiment of the present application, for the storage volume bound to the application instance, the storage volume is mounted on the host directory tree in a subtree mount manner, that is, the host directory tree includes the root mount point of the storage volume and a submount point pointing to the root mount point, so that the application instance can access the storage volume through the root mount point on the host directory tree, thereby achieving the purpose of using the host's storage system as a storage facility for application instances to realize data sharing and persistence through the storage volume.

[0065] Furthermore, by mounting the storage volume in a subtree, when the storage volume is bound to multiple application instances, multiple application instances all access the storage volume through the root mount point. Multiple application instances can share the same cache space through the root mount point, saving the host machine's memory resources.

[0066] Furthermore, the subtree mount method is a mount operation natively supported by the host operating system, and can maintain the same logic and user experience as independent mount in terms of system-level information statistics and mount permission control. For example, it can continue to support read-write, read-only and other mount permission controls. For the same storage volume bound to multiple application instances, it supports some application instances to mount the storage volume in read-write mode and some application instances to mount the storage volume in read-only mode. For another example, based on the creation of a sub-mount point, the operating system can perceive each mount of the same storage volume in the host directory tree, which facilitates the management and maintenance of storage volume mounts, facilitates system-level information statistics for storage volumes, and provides a better user experience.

[0067] FIG2 is a flow chart of another storage volume mounting method provided in an embodiment of the present application. Referring to FIG2 , the method may include the following steps:

[0068] 200. Determine a target storage volume bound to the target application instance and to be mounted on a host directory tree. The host directory tree is a directory tree of the host where the target application instance is located.

[0069] 201. Determine whether the host directory tree contains the root mount point of the target storage volume; if the judgment result is no, that is, the host directory tree does not contain the root mount point of the target storage volume, execute steps 202, 203 and 204; if the judgment result is yes, that is, the host directory tree contains the root mount point of the target storage volume, execute steps 203 and 204.

[0070] 202. Create a root mount point of the target storage volume in the host directory tree, allocate cache space for the target storage volume according to the root mount point of the target storage volume, bind the cache space of the target storage volume to the root mount point of the target storage volume, and execute step 203.

[0071] 203 . Create a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, and execute step 204 .

[0072] 204. Mount the target storage volume to the root mount point in a subtree mount manner based on the submount point, so that the target application instance has priority access to the cache space of the target storage volume through the root mount point.

[0073] The implementation of step 200, step 201, step 203 and step 204 in this embodiment can refer to the relevant introduction of the above embodiment and will not be repeated here.

[0074] In this embodiment, when a root mount point is created for the target storage volume, cache space can also be allocated to the target storage volume based on the root mount point, and the cache space of the target storage volume is bound to the root mount point of the target storage volume. The cache space is used to store cache data corresponding to the target storage volume, such as data, metadata, directory entries, etc. in the target storage volume. It should be noted that the cache data will change dynamically with the access situation of the target storage volume. In the embodiment of the present application, cache resources are allocated to the target storage volume at the granularity of the mounted directory tree. For each application instance bound to the target storage volume, the cache space can be shared through the pointing relationship between the sub-mount point and the root mount point, without maintaining a copy of cache data for each application instance, which is beneficial to saving cache resources of the host machine.

[0075] After the target storage volume is mounted on the host directory tree, the target application instance bound to the target storage volume can access the target storage volume through the host directory tree. Based on mounting the target storage volume on the host directory tree in a subtree mounting manner, the embodiment of the present application also provides a method for accessing the storage volume.

[0076] FIG3 is a flow chart of a storage volume access method provided by an embodiment of the present application. Referring to FIG3 , the method may include the following steps:

[0077] 301. In response to an access operation of a target application instance to a target storage volume, an access path of the target storage volume is generated according to a root mount point and a sub-mount point of the target storage volume in a host directory tree.

[0078] 302. Perform a corresponding type of access operation on the target storage volume according to the access path, wherein the target storage volume is a storage volume bound to the target application instance and mounted on the host directory tree.

[0079] In this embodiment, the target storage volume is a storage volume bound to the target application instance and mounted on the host directory tree, and the target storage volume will be mounted on the host directory tree in a subtree mounting manner. For the relevant description of the mounting process, please refer to the previous embodiment and will not be repeated here.

[0080] After the target storage volume is mounted on the host directory tree, the target application instance can initiate access operations on the target storage volume. Access operations include, but are not limited to: opening files in the target storage volume, reading / writing files in the target storage volume, closing files in the target storage volume, etc. The target application instance can initiate access operations on the target storage volume through the Portable Operating System Interface (POSIX) interface, but is not limited to this. Among them, the access operation to the target storage volume can be performed by the host operating system, which is not limited to this.

[0081] After the target application instance initiates an access operation to the target storage volume, the host directory tree can be queried to determine the root mount point and sub-mount point of the target storage volume on the host directory tree. The sub-mount point here refers to the sub-mount point of the target storage volume on the host directory tree for the target application instance that initiated the access operation. Then, based on the root mount point and sub-mount point of the target storage volume on the host directory tree, an access path for the target storage volume is generated; based on the access path, the corresponding type of access operation is performed on the target storage volume. The types of access operations include, but are not limited to: opening, reading / writing, closing files, etc. It should be noted that as the access operation is executed, metadata such as the last access time and access object of the accessed file will change.

[0082] In this embodiment, a sub-mount point can be understood as a directory one level below the root mount point, and a root mount point can be understood as a directory one level above the sub-mount point. When generating an access path to the target storage volume based on the root mount point and sub-mount points of the target storage volume in the host directory tree, a primary access path can be generated based on the root mount point, and a sub-access path can be generated based on the sub-mount point. Then, based on the pointing relationship between the sub-mount point and the root mount point, the primary access path and the sub-access path are concatenated to obtain the access path to the target storage volume.

[0083] FIG4 is a flow chart of another storage volume access method provided by an embodiment of the present application. Referring to FIG4 , the method may include the following steps:

[0084] 401. In response to an access operation of a target application instance to a target storage volume, determine a cache space of the target storage volume bound to a root mount point of the target storage volume.

[0085] 402. Access the cache space of the target storage volume, where the target storage volume is a storage volume bound to the target application instance and mounted on the host directory tree.

[0086] 403. If the cache space of the target storage volume does not contain the data required for the access operation, generate an access path to the target storage volume according to the root mount point and the sub-mount point of the target storage volume on the host directory tree.

[0087] 404. Perform a corresponding type of access operation on the target storage volume according to the access path.

[0088] In this embodiment, after the target application instance initiates an access operation to the target storage volume, it can give priority to accessing the cache space of the target storage volume, and if the cache space of the target storage volume does not contain the data required for the access operation, the target storage volume's access path is generated based on the target storage volume's root mount point and sub-mount point on the host machine's directory tree, and the target storage volume is accessed based on the access path. Furthermore, if the data required for the access operation exists in the cache space of the target storage volume, the host machine's local cache space can be directly accessed without accessing the remote physical storage system, which is beneficial to improving data access speed and efficiency. In addition, for the description of other steps in this embodiment, please refer to the aforementioned embodiment and will not be repeated here.

[0089] The technical solution provided by the embodiment of the present application is to mount the storage volume bound to the application instance to the host directory tree in a subtree mount mode, and to bind the cache space of the target storage volume to the root mount point of the target storage volume. This allows multiple application instances to share the cache space of the target storage volume, eliminating the need to configure multiple cache spaces for the same storage volume, thus saving the cache resources of the host. In this way, when an application instance initiates an access operation to the storage volume, it can give priority to accessing the cache space of the target storage volume, and only access the target storage volume if the cache space of the target storage volume does not contain the data required for the access operation, which is conducive to improving data access efficiency and speed.

[0090] In order to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described in detail below using the K8s (short for Kubernetes) cluster scenario as an example.

[0091] In Kubernetes clusters, the concept of PV is introduced, allowing Pods to bind to PVs, and multiple Pods to bind to the same PV. By mounting the PV to the host's directory tree, Pods can achieve data sharing and persistent storage through the host's storage system. In traditional solutions, each Pod mounts the PV independently. From the perspective of the host's operating system, each mount is a separate directory tree, which is completely isolated and does not share any resources. With this independent mounting method, when different Pods bind to the same PV, the cache resources of the same PV are not shared by different Pods. Separate copies of the PV's cache data must be maintained for each Pod, which wastes the host's cache resources.

[0092] In view of the above problems, the embodiments of the present application can provide a new mounting solution for PV, that is, mounting PV in a subtree mounting manner. Specifically, referring to Figure 5, taking a working node (Node) in a K8s cluster as an example, one or more Pods can be deployed on the Node. In Figure 5, three different Pods, namely Pod1, Pod2, and Pod3, are deployed on the Node as an example, and the three Pods need to be bound through the following PV. Assume that the persistent volume bound to the three Pods is denoted as PV1.

[0093] Before Pod1 accesses PV1, it must first mount PV1 according to the following steps: Based on PV1's name, it queries the operating system's mount list to see if its root mount point exists. If PV1's root mount point doesn't exist in the mount list, it creates a root mount point for PV1 in the host directory tree. The root mount point and its name are stored in the mount list, and a submount point 1 is created for PV1 in the host directory tree, pointing to PV1's root mount point. PV1 is then mounted on submount point 1 in the host directory tree, and the root mount point is bound to a cache. If PV1's root mount point exists in the mount list, a submount point 1 is created for PV1 in the host directory tree, pointing to PV1's root mount point, and PV1 is mounted on submount point 1 in the host directory tree. Similarly, before Pod2 or Pod3 accesses PV1, PV1 must be mounted using the subtree mount method described above.

[0094] In Figure 5, the root mount point of PV1 is shown as a first-level directory. For Pod1, the sub-mount point of PV1 is a second-level directory; for Pod2, the sub-mount point of PV1 is another second-level directory; for Pod3, the sub-mount point of PV1 is a third-level directory. All three sub-mount points point to the root mount point.

[0095] Regardless of which Pod, after PV1 is mounted for the Pod, when the Pod initiates an access operation on PV1, it will first access the cache space bound to the root mount point of PV1, and if the cache space of PV1 does not contain the data required for the access operation, it will access PV1 based on the root mount point and the corresponding sub-mount point.

[0096] It is worth noting that the host directory tree in Figure 5 is the directory tree of the file storage system mounted by the working node.

[0097] Because each mount operation on PV1 requires the creation of a submount point, the operating system is aware of it. This facilitates system-level statistics on PV1, such as the number of mounts performed on PV1 and the Pod that initiated each mount. Furthermore, a daemon process can be deployed on the worker node and started upon the first mount operation on PV1. The daemon monitors mount operations on PV1. When a root mount point is created for PV1, the daemon initializes the reference count of the root mount point to 0. Each time a submount point pointing to the root mount point is added to PV1, the reference count of the root mount point is incremented by 1. Furthermore, when a Pod bound to PV1 (e.g., Pod1) is detected to be destroyed on the node, the submount point corresponding to the destroyed Pod is deleted from the host directory tree, and the reference count of the root mount point is decremented by 1. If the daemon detects that the reference count of the root mount point returns to 0, it prompts the operating system to unmount the root mount point from the host directory tree.

[0098] In this embodiment, the PV bound to the Pod is mounted in a subtree mounting manner. First, the Pod can access the PV through the root mount point on the host directory tree, so that the Pod can use the host's storage system as a data sharing and persistent storage facility through the PV. Furthermore, when multiple Pods are bound to the same PV, the PV is mounted in a subtree manner, and the root mount point allows multiple Pods to share the same cache resources (including data, metadata, and directory entries, etc.), which can save the host's memory resources and improve the host's resource utilization. In addition, mounting the PV in a subtree is a mounting operation natively supported by the operating system. With the help of subtree mounting, when the same PV is bound to multiple Pods, it supports some Pods to mount it in read-write mode, and supports some Pods to mount it in read-only mode, which has good flexibility in terms of mount permission control. Furthermore, by mounting a PV as a subtree, the operating system can perceive each PV mount. Therefore, various system-level information can be counted for the PV, such as the number of times the PV has been mounted, which Pods are bound to it, and the disk space occupied by each mount, which facilitates the management and maintenance of PV mounts.

[0099] FIG6 is a schematic diagram of the structure of a storage volume mounting device provided in an embodiment of the present application. Referring to FIG6 , the device may include: a determination module 61 for determining a target storage volume bound to a target application instance and to be mounted on a host directory tree, where the host directory tree is a directory tree of the host where the target application instance is located; a creation module 62 for creating a submount point pointing to the root mount point in the host directory tree for the target application instance if the host directory tree contains a root mount point of the target storage volume; and a mounting module 63 for mounting the target storage volume to the root mount point in a subtree mount manner based on the submount point, so that the target application instance can access the target storage volume through the root mount point.

[0100] Further optionally, the creation module 62 is further configured to create a root mount point of the target storage volume in the host directory tree before creating the sub-mount point if the host directory tree does not contain the root mount point of the target storage volume.

[0101] Further optionally, the target storage volume can be bound to multiple application instances on the host machine, and the multiple application instances include the target application instance.

[0102] Further optionally, the above-mentioned device also includes a matching module, which is used to: match the mount list corresponding to the host directory tree according to the identifier of the target storage volume, where the mount list records the mapping relationship between the storage volume mounted on the host directory tree and the root mount point; if the identifier of the target storage volume is matched, the root mount point corresponding to the identifier of the target storage volume is used as the root mount point of the target storage volume; if the identifier of the target storage volume is not matched, it is determined that the root mount point of the target storage volume is not included in the host directory tree.

[0103] Further optionally, when the creation module 62 creates a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, it is specifically used to: obtain the directory location corresponding to the target application instance in the host directory tree from the configuration file corresponding to the target application instance; use the directory location as the sub-mount point, and establish a pointing relationship between the sub-mount point and the root mount point.

[0104] Further optionally, when establishing the pointing relationship between the child mount point and the root mount point, the creation module 62 is specifically configured to: use the root mount point as the parent mount point of the child mount point, and record the identifier of the root mount point in the attribute information of the child mount point.

[0105] Further optionally, the mounting module 63 is further configured to update the step size according to a set number of times, and increase the number of references to the root mounting point, wherein the number of update step sizes is a positive integer.

[0106] Further optionally, the mounting module 63 is also used to update the step size according to the number of times and reduce the number of references to the root mount point when the target application instance is destroyed from the host machine; and to uninstall the root mount point from the host machine directory tree when the number of references to the root mount point is a preset initial value.

[0107] Further optionally, the above-mentioned device also includes an access module for responding to the access operation of the target application instance to the target storage volume, generating an access path of the target storage volume based on the root mount point and sub-mount point of the target storage volume on the host directory tree; and performing corresponding types of access operations on the target storage volume according to the access path.

[0108] Optionally, the creation module 62 is further configured to allocate cache space for the target storage volume based on the target storage volume's root mount point, and to bind the target storage volume's cache space to the target storage volume's root mount point. Based on this, the access module is specifically configured to: respond to the target application instance's access operation to the target storage volume, determine the target storage volume's cache space bound to the target storage volume's root mount point; access the target storage volume's cache space; if the target storage volume's cache space does not contain the data required for the access operation, generate an access path to the target storage volume based on the target storage volume's root mount point and sub-mount points in the host directory tree; and perform the corresponding type of access operation on the target storage volume based on the access path.

[0109] The device shown in FIG6 can execute the method shown in FIG1 to FIG3, and its implementation principle and technical effect are not described in detail. The specific manner in which each module and unit performs the operation of the device shown in FIG6 in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.

[0110] FIG7 is a schematic diagram of the structure of a storage volume access device provided in an embodiment of the present application. Referring to FIG7 , the device may include: a generation module 71 for responding to an access operation of a target application instance on a target storage volume and generating an access path to the target storage volume based on the root mount point and submount points of the target storage volume in the host directory tree; and an access module 72 for performing a corresponding type of access operation on the target storage volume based on the access path, wherein the target storage volume is a storage volume bound to the target application instance and mounted on the host directory tree.

[0111] Further optionally, the apparatus further includes a determination module configured to determine the cache space of the target storage volume bound to the root mount point of the target storage volume before the generation module 71 generates the access path. Based on this, the access module 72 is further configured to: access the cache space of the target storage volume; if the cache space of the target storage volume does not contain the data required for the access operation, execute the step of generating an access path to the target storage volume; if the cache space of the target storage volume contains the data required for the access operation, directly obtain the data required for the access operation from the cache space of the target storage volume.

[0112] The device shown in FIG7 can execute the method shown in FIG4, and its implementation principle and technical effects are not described in detail. The specific manner in which each module and unit performs the operation of the device shown in FIG7 in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.

[0113] It should be noted that in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The sequence numbers of the operations, such as 401, 402, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to being different types.

[0114] 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 used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0115] FIG8 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. As shown in FIG8 , the computer device includes: a memory 81 and a processor 82 .

[0116] The memory 81 is used to store computer programs and can be configured to store various other data to support operations on the computer device. Examples of such data include instructions for any application or method operating on the computer device, messages, pictures, videos, etc.

[0117] The memory 81 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0118] The processor 82 is coupled to the memory 81 and is used to execute the computer program in the memory 81 to implement the steps in the storage volume mounting method and / or storage volume access method provided in the embodiments of the present application.

[0119] In some embodiments, the processor 82 executes a computer program in the memory 81 to: determine the target storage volume bound to the target application instance and to be mounted on the host directory tree, the host directory tree being the directory tree of the host where the target application instance is located; determine whether the host directory tree contains the root mount point of the target storage volume; if the judgment result is yes, that is, the host directory tree contains the root mount point of the target storage volume, create a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, and mount the target storage volume to the root mount point in a subtree mount manner based on the sub-mount point, so that the target application instance can access the target storage volume through the root mount point.

[0120] Further optionally, if the judgment result is no, that is, the host directory tree does not contain the root mount point of the target storage volume, a root mount point of the target storage volume is created in the host directory tree, and a sub-mount point pointing to the root mount point is created in the host directory tree for the target application instance, and the target storage volume is mounted to the root mount point in a subtree mounting manner based on the sub-mount point, so that the target application instance can access the target storage volume through the root mount point.

[0121] In an optional embodiment, the target storage volume can be bound to multiple application instances on the host machine, and the multiple application instances include the target application instance.

[0122] In an optional embodiment, the processor 82 is further used to: match the target storage volume identifier in the mount list corresponding to the host directory tree, where the mount list records the mapping relationship between the storage volume mounted on the host directory tree and the root mount point; if the target storage volume identifier is matched, the root mount point corresponding to the target storage volume identifier is used as the root mount point of the target storage volume; if the target storage volume identifier is not matched, it is determined that the host directory tree does not contain the root mount point of the target storage volume.

[0123] In an optional embodiment, when the processor 82 creates a sub-mount point pointing to the root mount point in the host directory tree for the target application instance, it is specifically used to: obtain the directory location corresponding to the target application instance in the host directory tree from the configuration file corresponding to the target application instance; use the directory location as the sub-mount point, and establish a pointing relationship between the sub-mount point and the root mount point.

[0124] In an optional embodiment, when establishing a pointing relationship between a child mount point and a root mount point, the processor 82 is specifically configured to: use the root mount point as the parent mount point of the child mount point, and record the identifier of the root mount point in the attribute information of the child mount point.

[0125] In an optional embodiment, after the processor 82 mounts the target storage volume to the root mount point in a subtree mount manner based on the sub-mount point, it is also used to: update the step size according to a set number of times, and increase the number of references to the root mount point, where the number update step size is a positive integer.

[0126] In an optional embodiment, the processor 82 is further used to: when the target application instance is destroyed from the host machine, update the step size according to the number of times to reduce the number of references to the root mount point; and when the number of references to the root mount point is a preset initial value, uninstall the root mount point from the host machine directory tree.

[0127] In an optional embodiment, the processor 82 is further used to: respond to the target application instance's access operation to the target storage volume, generate an access path to the target storage volume based on the root mount point and sub-mount point of the target storage volume on the host directory tree; and perform corresponding types of access operations on the target storage volume based on the access path.

[0128] In an optional embodiment, the processor 82 is further configured to: allocate cache space to the target storage volume according to the root mount point of the target storage volume, and bind the cache space of the target storage volume to the root mount point of the target storage volume.

[0129] In an optional embodiment, the processor 82 is specifically used to: respond to the target application instance's access operation to the target storage volume, determine the cache space of the target storage volume bound to the root mount point of the target storage volume; if the cache space of the target storage volume does not contain the data required for the access operation, generate an access path to the target storage volume based on the root mount point and sub-mount point of the target storage volume on the host directory tree; and perform a corresponding type of access operation on the target storage volume based on the access path.

[0130] In some embodiments, the processor 82 executes a computer program in the memory 81 to: respond to the target application instance's access operation to the target storage volume, generate an access path to the target storage volume based on the root mount point and sub-mount point of the target storage volume on the host directory tree; and perform corresponding types of access operations on the target storage volume based on the access path, wherein the target storage volume is a storage volume bound to the target application instance and mounted on the host directory tree.

[0131] In an optional embodiment, before generating the access path of the target storage volume, the processor 82 is further used to: determine the cache space of the target storage volume bound to the root mount point of the target storage volume; if the cache space of the target storage volume does not contain the data required for the access operation, then execute the step of generating the access path of the target storage volume.

[0132] For details on the steps in each method, please refer to the aforementioned embodiments and will not be repeated here.

[0133] Furthermore, as shown in Figure 8, the computer device also includes: a communication component 83, a display 84, a power supply component 85, an audio component 86 and other components. Figure 8 only schematically shows some components, which does not mean that the computer device only includes the components shown in Figure 8. In addition, the components in the dotted box in Figure 8 are optional components, not mandatory components, and the specific components may depend on the product form of the computer device. The computer device of this embodiment can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone or an IOT (Internet of things) device, or it can be a server-side device such as a conventional server, a cloud server or a server array. If the computer device of this embodiment is implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, etc., it may include the components in the dotted box in Figure 8; if the computer device of this embodiment is implemented as a server-side device such as a conventional server, a cloud server or a server array, it may not include the components in the dotted box in Figure 8.

[0134] The detailed implementation process of the processor executing each action can be found in the relevant description in the aforementioned method embodiment or device embodiment, and will not be repeated here.

[0135] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps in the storage volume mounting method and / or storage volume access method provided in the embodiment of the present application.

[0136] Accordingly, an embodiment of the present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement the steps in the storage volume mounting method and / or storage volume access method provided in the embodiment of the present application.

[0137] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi (Wireless Fidelity), 2G (2Generation, 2nd generation), 3G (3Generation, 3rd generation), 4G (4Generation, 4th generation) / LTE (long Term Evolution, long term evolution), 5G (5Generation, 5th generation) and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wide band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0138] The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0139] The power supply assembly provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.

[0140] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as call mode, recording mode, and voice recognition mode, the microphone is configured to receive external audio signals. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0141] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0142] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized 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 processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0143] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0144] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0145] In a typical configuration, a computing device includes one or more processors (central processing units, CPUs), input / output interfaces, network interfaces, and memory.

[0146] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0147] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 RAM (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 technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0148] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0149] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A storage volume mounting method, characterized in that: include: Determine a target storage volume bound to the target application instance and to be mounted on a host directory tree, where the host directory tree is a directory tree of the host where the target application instance is located; If the host directory tree contains the root mount point of the target storage volume, create a sub-mount point pointing to the root mount point in the host directory tree for the target application instance; The target storage volume is mounted on the root mount point in a subtree mount manner based on the submount point, so that the target application instance accesses the target storage volume through the root mount point.

2. The method according to claim 1, characterized in that Also includes: If the host directory tree does not contain the root mount point of the target storage volume, before creating the sub-mount point, the root mount point of the target storage volume is created in the host directory tree.

3. The method according to claim 1, characterized in that The target storage volume can be bound to multiple application instances on the host machine, and the multiple application instances include the target application instance.

4. The method according to claim 1, characterized in that: Also includes: Matching the target storage volume in a mount list corresponding to the host directory tree according to the identifier of the target storage volume, wherein the mount list records a mapping relationship between the storage volume mounted on the host directory tree and the root mount point; If the identifier of the target storage volume is matched, using the root mount point corresponding to the identifier of the target storage volume as the root mount point of the target storage volume; If the identifier of the target storage volume is not matched, it is determined that the host directory tree does not contain the root mount point of the target storage volume.

5. The method according to claim 1, characterized in that Creating a sub-mount point pointing to the root mount point in the host directory tree for the target application instance includes: Obtaining, from a configuration file corresponding to the target application instance, a directory location corresponding to the target application instance in the host directory tree; The directory location is used as a sub-mount point, and a pointing relationship between the sub-mount point and the root mount point is established.

6. The method according to claim 5, characterized in that Establishing a pointing relationship between the sub-mount point and the root mount point includes: The root mount point is used as the parent mount point of the child mount point, and the identifier of the root mount point is recorded in the attribute information of the child mount point.

7. The method according to claim 1, characterized in that After mounting the target storage volume to the root mount point in a subtree mount mode based on the sub-mount point, the method further includes: The number of references to the root mount point is increased according to a set number of update steps, wherein the number of update steps is a positive integer.

8. The method according to claim 7, characterized in that Also includes: When the target application instance is destroyed from the host machine, the step size is updated according to the number of times, and the number of The number of references to the root mount point; as well as When the number of references to the root mount point is equal to a preset initial value, the root mount point is uninstalled from the host directory tree.

9. The method according to claim 2, characterized in that: Also includes: A cache space is allocated to the target storage volume according to the root mount point of the target storage volume, and the cache space of the target storage volume is bound to the root mount point of the target storage volume.

10. The method according to claim 9, characterized in that Also includes: In response to an access operation of the target application instance to the target storage volume, determining a cache space of the target storage volume bound to a root mount point of the target storage volume; If the cache space of the target storage volume does not contain the data required for the access operation, generating an access path for the target storage volume according to the root mount point and the sub-mount point of the target storage volume on the host directory tree; According to the access path, a corresponding type of access operation is performed on the target storage volume.

11. A storage volume access method, characterized in that: include: In response to the target application instance's access operation to the target storage volume, an access path to the target storage volume is generated according to a root mount point and a sub-mount point of the target storage volume on a host directory tree; According to the access path, a corresponding type of access operation is performed on the target storage volume, wherein the target storage volume is a storage volume bound to the target application instance and mounted on the host directory tree.

12. The method according to claim 11, characterized in that Before generating the access path of the target storage volume, the method further includes: Determine a cache space of the target storage volume bound to a root mount point of the target storage volume; If the cache space of the target storage volume does not contain the data required for the access operation, a step of generating an access path for the target storage volume is performed.

13. A computer device, characterized in that: include: Memory and processor; The memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to perform the steps in the method according to any one of claims 1 to 10 and claims 11 to 12.

14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps of the method according to any one of claims 1 to 10 and claims 11 to 12.