WO2021185109A1 - Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统 - Google Patents

Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统 Download PDF

Info

Publication number
WO2021185109A1
WO2021185109A1 PCT/CN2021/079582 CN2021079582W WO2021185109A1 WO 2021185109 A1 WO2021185109 A1 WO 2021185109A1 CN 2021079582 W CN2021079582 W CN 2021079582W WO 2021185109 A1 WO2021185109 A1 WO 2021185109A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual file
file system
file block
block
virtual
Prior art date
Application number
PCT/CN2021/079582
Other languages
English (en)
French (fr)
Inventor
杜量
郭贵鑫
钟康游
杜云飞
卢宇彤
周中柱
Original Assignee
中山大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中山大学 filed Critical 中山大学
Publication of WO2021185109A1 publication Critical patent/WO2021185109A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0772Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/188Virtual file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Definitions

  • the invention relates to the field of file system storage, and more specifically, to a small file storage optimization system based on a virtual file system in a KUBERNETES user mode application.
  • the storage performance of small files is an important aspect that affects the storage performance of the entire file system.
  • the read and write performance of a large number of small files represented by small pictures and small texts affects the entire depth
  • the overall efficiency of the learning and training process has an important impact.
  • KUBERNETES is an open source system for automatic deployment, scaling and management of containerized applications. It aims to provide "a platform for automatic deployment, expansion, and running application containers across host clusters.” It supports a series of container tools, including DOCKER etc. And group the containers that make up the application into logical units for easy management and discovery. The container takes up less resources and is deployed quickly. Each application can be packaged into a container image. The one-to-one relationship between each application and the container also gives the container a greater advantage. The container can be used to create the application during the build or release stage. Container mirroring, because each application does not need to be combined with the rest of the application stack, nor is it dependent on the infrastructure of the production environment, which makes it possible to provide a consistent environment from R&D to testing and production. Similarly, containers are lighter and more "transparent" than virtual machines, which is easier to monitor and manage.
  • KUBERNETES includes MASTER nodes and normal (working) nodes. Each normal node contains POD (container group), KUBELET and KUBE-PROXY. Each POD contains one or more CONTAINER (containers), and each node is equivalent to one A virtual machine/physical machine.
  • the target file system can be a variety of distributed file systems, such as the Lustre file system.
  • Lustre is a cluster storage architecture. Its core component is the lustre file system. The file system can run on the Linux operating system and provides POSIX compliance. * Standard UNIX file system interface.
  • Lustre architecture is commonly used in high-performance computing clusters, and can provide PB-level storage and hundreds of GB per second throughput.
  • the storage usage of the Lustre file system gradually increases, the efficiency of reading and writing small files will decrease significantly as the amount of files continues to be stored in the Lustre file system.
  • the file system needs to retrieve the metadata of its specific small files in the entire file system, which is an important factor affecting the storage performance of small files. factor.
  • the present invention aims to overcome at least one of the above-mentioned drawbacks of the prior art, and provides a small file storage optimization system based on a virtual file system in a KUBERNETES user mode application, which is used to solve the problem of small file storage and storage.
  • a small file storage optimization system based on a virtual file system in a KUBERNETES user mode application is characterized in that the optimization system is applied to a target file system, and the optimization system includes a user mode application, a network file system, and a virtual file system.
  • the virtual file system includes a virtual file system client and a virtual file system server, the network file system includes a network file system server and a network file system client, and the user mode application includes the network file system client;
  • the network file system server and the virtual file system are encapsulated in the same image
  • the container in which the image is located is a special NFS image container
  • the user mode application is encapsulated in the user mode application image
  • the user mode application image is located
  • the container is a user-mode application image container
  • the NFS special image container and the user-mode application image container are both deployed in the KUBERNETES cluster
  • the target file system is the file system used by the KUBERNETES cluster
  • the virtual file system client is deployed on the client of the target file system, and the virtual file system client is configured to send the virtual file block creation request issued by the user-mode application to the virtual file system Server; the virtual file system server is deployed on the object storage server of the target file system; the virtual file system server includes a file block allocation and formatting module, and the file block creation and formatting module is used for Create and format a virtual file block on one or more of the object storage target devices of the target file system according to a virtual file block creation request issued by the virtual file system client; the virtual file block is used to store small files , The virtual file block is mounted on the shared directory exposed by the network file system server.
  • the optimization system provided by the present invention is established on the KUBERNETES cluster.
  • a user-mode application image container and an NFS special image container are deployed on the cluster.
  • the two containers can be located on any KUBERNETES node, and the image encapsulating the user-mode application is set in In the user mode application image container, the image encapsulating the network file system server and the virtual file system is set in the NFS special image container.
  • the optimization system is applied to the target file system.
  • the target file system is the file system used by the KUBERNETES cluster.
  • the target file system includes an object storage server and an object storage target device.
  • the object storage server is responsible for the client and physical storage of the target file system. For interaction and data storage, the client accesses the file data stored in the object storage target device through the object storage server.
  • the virtual file system client in the virtual file system will be deployed on the client of the target file system, in the virtual file system
  • the virtual file system server will be deployed on the object storage server of the target file system.
  • the user-mode application sends a virtual file block creation request to the virtual file system client.
  • the virtual file system client transmits it to the deployment target through the client of the target file system.
  • the virtual file system server on the storage server.
  • the virtual file system server includes a file block allocation and formatting module. Since this module is on the object storage server, it can manage one or more object storage target devices. This module obtains After the virtual file block creation request issued by the virtual file system client, the virtual file block is created and formatted on one or more object storage target devices to store small files.
  • the user mode application is mounted on the shared directory exposed by the network file system server through the network file system client contained in the application itself.
  • the network file system server exposes the shared directory so that the network file system client host can access the files in the shared directory. , And its access process is the same as accessing local storage.
  • Also mounted on the shared directory is the virtual file block created above.
  • the virtual file block created on the object storage target device is mounted on the shared directory, and the user is realized through the client and server of the network file system. The purpose of the state application to read and write small files to the virtual file block.
  • the virtual file system can be extremely Dadi improves the read and write performance of a large number of small files, and retains the advantages of distributed shared storage that is easy to manage and can be mounted anywhere based on the network.
  • the user mode application is also used to send virtual file block parameters to the virtual file system client
  • the virtual file system client is also used to send virtual file block parameters issued by the user mode application to the virtual file system service
  • the virtual file block parameters include virtual file block execution request parameters
  • the virtual file system server includes a request parameter processing module; the request parameter processing module is used to obtain the virtual file system client issued by the virtual file system. File block execution request parameter, and judging whether a virtual file block can be created according to the virtual file block execution request parameter;
  • the file block creation and formatting module is configured to create and format virtual file blocks on one or more of the object storage target devices of the target file system according to a virtual file block creation request issued by the virtual file system client Specifically, the file block creation and formatting module is configured to obtain the determination result of the request parameter processing module after receiving the virtual file block request sent by the virtual file system client, and when the request parameter processing When the module determines that the virtual file block can be created, it creates and formats the virtual file block on one or more of the object storage target devices of the target file system.
  • the user-mode application also sends to the virtual file system client the virtual file block parameters required when the virtual file block is created.
  • the virtual file block parameters include virtual file block execution request parameters, and the request parameter processing module is mainly used to The parameter judges whether the request of the virtual file block is executable. Specifically, the module is used to obtain the virtual file block execution request parameter in the virtual file block parameter, and judge whether the virtual file block can be created according to the parameter; the file block creation and format mentioned above
  • the transformation module is used to determine whether to create a file block according to the judgment result of the request parameter processing module. When the request parameter processing module determines that a virtual file block can be created, the file block creation and formatting module will store the target device in the object of the virtual file system. Create a virtual file block on it.
  • the virtual file block execution request parameters include the size of the virtual file block and the format of the virtual file block; the request parameter processing module is used to obtain the virtual file block sent by the virtual file system client Execute request parameters, and determine whether a virtual file block can be created according to the virtual file block execution request parameters, specifically:
  • the request parameter processing module is configured to obtain the size of the virtual file block and the format of the virtual file block sent by the virtual file system client, and detect the target according to the received size of the virtual file block Whether the storage capacity of the file system and the user storage quota of the target system meet the requirements for creating virtual file blocks, if not, an error message will be reported; if they are met, the received virtual file block format will be detected according to the Whether the format is applicable to the format of the target file system, if applicable, it is determined that a virtual file block can be created, and if it is not applicable, it is determined that a virtual file block cannot be created.
  • the virtual file block execution request parameters are mainly used to provide specific creation parameters after a virtual file block creation request is initiated to the virtual file system server.
  • the virtual file block execution request parameters include the size of the virtual file block and the virtual file that the user needs to create Block format, after the request parameter processing module receives the virtual file block execution request parameter, it judges whether the target file system satisfies the virtual file according to the size of the virtual file block, the storage capacity of the target file system and the user storage quota of the target file system If the block creation is not satisfied, it indicates that the virtual file block cannot be created, an error message is reported, and the virtual file block creation failed. If it is satisfied, the target file system is judged based on the format of the virtual file block and the file format of the target file system. If the component of the virtual file block is applicable, it is determined that the virtual file block can be constructed; if not, it indicates that the virtual file block cannot be created, and an error message is reported.
  • the virtual file block parameters further include virtual file block mounting parameters
  • the virtual file system server further includes a mounting and management module
  • the mounting and management module is used to obtain the virtual file block mounting request Parameter, and used to detect whether the virtual file block has been mounted on the shared directory according to the virtual file block mounting request parameter: if yes, exit the current operation, if not, determine whether the virtual file block is mounted Whether the parameter is legal: if it is legal, mount the virtual file block on the shared directory, if it is illegal, roll back the current operation.
  • the virtual file block parameters sent by the user-mode application to the virtual file system client also include virtual file block mounting parameters.
  • the mounting and management module is mainly used to execute the mounting of the virtual file block according to the parameters. Specifically, This module is used to obtain the virtual file block mounting parameters in the virtual file block parameters, and detect whether the virtual file block has been mounted on the shared directory according to the parameters. If so, there is no need to perform the mounting operation again, and the module can exit the current operation If not, the module needs to determine whether the parameter is a legal parameter, for example, whether the mount point that may be included in the parameter is a legal mount point, etc., if it is, the mount of the virtual file block can be executed, if not, then The module rolls back the current operation without mounting the virtual file block.
  • the mounting and management module is used to obtain the virtual file block mounting request parameter, and is used to detect whether the virtual file block has been mounted on the shared directory according to the virtual file block mounting request parameter : If yes, exit the current operation, specifically: the virtual file block mount request parameter includes a mount request directory and a mount request mode, and the mount and management module is used to obtain the mount request directory and the mount request mode.
  • the mount request mode is used to detect whether the virtual file block has been mounted on the shared directory according to the mount request directory, and if so, determine whether the current virtual file block is mounted on the shared directory. Whether the mode is the same as the mount request mode: if the same, exit the current operation, if not, change the mount mode of the current virtual file block to the shared directory to the mount request mode, If not legal.
  • the virtual file block mounting parameters obtained by the mounting and management module include the shared directory and the mounting request mode.
  • the shared directory is a necessary bridge for realizing user-mode applications to read and write small files to the virtual file block.
  • the mounting request mode is The mode when the virtual file block is mounted on the shared directory. After the mounting and management module has obtained the above two parameters, it detects whether the virtual file block has been mounted on the shared directory according to the shared directory. If so, it needs to further determine whether the current virtual file block is mounted on the shared directory. Whether the mode is the same as the mount request mode, if they are the same, there is no need to make any changes to the existing mount, and the module exits the current operation. If not, the current virtual file block's mount mode is changed according to the mount request mode.
  • the virtual file block parameter further includes a virtual file block permission parameter
  • the virtual file system server further includes a permission management module for when the virtual file block is mounted on the shared directory At the time, the virtual file block permission parameter is obtained, and the group permission of the shared directory and the read and write permission of the virtual file block are modified according to the virtual file block permission parameter.
  • the permission management module is mainly used to modify the group permissions of the shared directory and the read and write permissions of the virtual file block.
  • the group permissions refer to the users and groups that can read and write files, and the read and write permissions refer to the files that can be read or written by users.
  • the user-mode application sends the virtual file block permission parameter to the virtual file system client.
  • the permission management module included in the virtual file system server is used to obtain the parameter and modify the group permissions and permissions of the virtual file block according to the parameter. Read and write permissions enable users to more effectively use virtual file blocks to manage small files.
  • the virtual file block permission parameters include user UID/GID and the requested read and write permission of the virtual file block; the permission management module is used to modify the group permissions of the shared directory according to the virtual file block permission parameters And the read and write permissions of the virtual file block are specifically: the permission management module is used to verify the correctness of the user UID/GID, if it is not correct, roll back the current operation, if it is correct, according to the user UID/GID modifies the group permissions of the shared directory and verifies whether the requested read and write permissions of the virtual file block are legal. If legal, modify the read and write permissions of the virtual file block according to the requested read and write permissions of the virtual file, such as If it is illegal, the current operating limit will be rolled back.
  • the permission management module After obtaining the permission parameters of the virtual file block, the permission management module needs to verify the correctness of the parameters.
  • the permission parameters of the virtual file block also include the user UID/GID, which refers to the user ID and the group ID of the user.
  • the permission management module first verifies the permission parameters If the parameters are incorrect, the module needs to roll back the current operation; if the parameters are correct, modify the group permissions of the shared directory according to the user UID/GID, and verify whether the requested read and write permissions of the virtual file block Legal, if legal, modify the read and write permissions of the virtual file block according to the requested read and write permissions of the virtual file, if not legal, roll back the current operation;
  • the virtual file block permission parameters also include the requested read and write permissions of the virtual file block ,
  • the request for read and write permissions means that the user requests to set the read and write permissions for the virtual file block.
  • the permissions management module is also used to modify the read and write permissions for the virtual file block according
  • the virtual file system server further includes a service registration module, the service registration module is used to obtain all the virtual file block parameters, and is used for the group permissions of the shared directory and the read of the virtual file block.
  • the virtual file block registration information is added to the virtual file system client according to the acquired virtual file block parameters.
  • the service registration module is mainly used to add the registration information of the virtual file block in the virtual file system client. Specifically, the service registration module is used to obtain the parameters of the virtual file block. After the read and write permissions of the block are modified, the service registration module adds the acquired virtual file block parameters as the registration information of the virtual file block to the virtual file system client, so that the virtual file system client can manage the virtual file block and View its details.
  • the virtual file block registration information includes the size of the virtual file block, the shared directory, the group permissions of the shared directory, the read and write permissions of the virtual file block, and the mount request mode.
  • the service registration module After the service registration module obtains the virtual file block parameters, it selects the size of the virtual file block, the shared directory where the virtual file block is mounted, the group permissions of the shared directory, the read and write permissions of the virtual file block, and the virtual file block is mounted on the share
  • the mounting request mode of the directory as the main content of the virtual file block registration information, is conducive to the user-mode application to manage the virtual file block through the virtual file system client.
  • the virtual file system of the present invention can greatly improve the read and write performance of a large number of small files, and retain the advantages of distributed shared storage that is easy to manage and can be mounted anywhere based on the network.
  • FIG. 1 is a schematic diagram of container distribution in the KUBERNETES cluster in Embodiment 1 of the present invention.
  • Figure 2 is a schematic diagram of the interaction between the optimization system and the target file system on the KUBERNETES cluster in Embodiment 1 of the present invention.
  • FIG. 3 is a schematic diagram of the structure of the virtual file system server in Embodiment 1 of the present invention.
  • Fig. 4 is a processing flowchart of a request parameter processing module in Embodiment 1 of the present invention.
  • Fig. 5 is a processing flowchart of the mounting and management module in Embodiment 1 of the present invention.
  • Fig. 6 is a processing flow chart of the permission management module in embodiment 1 of the present invention
  • This embodiment provides a small file storage optimization system based on a virtual file system in a KUBERNETES user mode application.
  • the optimization system is applied to the file system of the KUBERNETES cluster, that is, the target file system.
  • the target file system includes an object storage server and an object storage target.
  • the object storage server is responsible for the interaction and data storage between the target file system client and the physical storage.
  • the client accesses the file data stored in the object storage target device through the object storage server.
  • the optimization system provided in this embodiment includes a user mode application, a network file system, and a virtual file system.
  • the virtual file system includes a virtual file system client and a virtual file system server.
  • the network file system includes a network file system server and a network file system client. , The network file system client is deployed in the user mode application;
  • the network file system server and the virtual file system are encapsulated in the same image.
  • the image is a special NFS image.
  • the container in which it is located is a special NFS image container.
  • the user-mode application is encapsulated in the user-mode application. In the image, the container where it is located is the user mode application image container;
  • the server exposes the network file service mount point, that is, the shared directory.
  • the user-mode application will be used to send a virtual file block creation request to the virtual file system client.
  • the user-mode application will use the network file system client contained in the application itself, and the user-mode application will use the network file system client to pass VOLUME.
  • the volume is mounted on the shared directory exposed by the network file system server; the virtual file system client is deployed on the client of the target file system, and the virtual file system client is used to send the virtual file block creation request issued by the user mode application to Virtual file system server; the virtual file system server is deployed on the object storage server of the target file system;
  • the virtual file system server includes a file block allocation and formatting module. Since this module is located on the object storage server, it can manage one or more object storage target devices. This module is used to store one or more object storage targets. Create and format virtual file blocks on the device. In this embodiment, after the file block creation and formatting module receives a virtual file block creation request sent by the virtual file system client, it creates and formats a virtual file block on the object storage target device X of one of the target file systems. File blocks, virtual file blocks are used to store small files.
  • the virtual file block is mounted on the shared directory exposed by the network file system server just like the user mode application, thereby realizing that the user mode application reads and writes and stores small files in the virtual file block through the network file system.
  • the KUBERNETES cluster environment by setting virtual file blocks on the object storage target devices of one or more target file systems, they are specially used to store small files, so that small files are stored in virtual file blocks and can be managed more efficiently. Small files and improve the efficiency of storing and reading small files.
  • the virtual file system server further includes a request parameter processing module
  • the user mode application is also used to send virtual file block parameters to the virtual file system client
  • the virtual file system client also uses
  • the virtual file block parameters include virtual file block execution request parameters
  • the virtual file block execution request parameters include the size of the virtual file block
  • the request parameter processing module is used to obtain the size of the virtual file block and the format of the virtual file block, and determine whether the virtual file block can be created according to the virtual file block execution request parameter
  • the file block creation and formatting module is used to create and format virtual file blocks on one or more of the object storage target devices of the target file system according to the virtual file block creation request sent by the virtual file system client.
  • the file block is specifically: the file block creation and formatting module is used to obtain the determination result of the request parameter processing module after receiving the virtual file block request sent by the virtual file system client, and when the request is When the parameter processing module determines that the virtual file block can be created, it creates and formats the virtual file block on one or more of the object storage target devices of the target file system.
  • the specific judgment process of the request parameter processing module is: detecting whether the storage capacity of the target file system and the user storage quota of the target system meet the requirements for creating virtual file blocks according to the size of the virtual file block. , Then report error information; if it is satisfied, check whether the format is suitable for the format of the target file system according to the format of the virtual file block, if applicable, determine that the virtual file block can be created, if not, report the error message.
  • the virtual file system server further includes a mounting and management module
  • the virtual file block parameters also include virtual file block mounting parameters
  • the virtual file block mounting request parameters include the shared directory and mounting Request mode.
  • the mount and management module is used to obtain the shared directory and mount request mode sent by the virtual file system client, and is used to perform the following operations according to the above two parameters:
  • the mounting and management module detects whether the virtual file block has been mounted on the shared directory according to the shared directory: if it is not mounted on the shared directory, it determines whether the shared directory and the mounting request mode are legal: If it is legal, mount the virtual file block on the shared directory, if it is illegal, roll back the current operation; if it has been mounted on the shared directory, judge the current virtual file block to mount according to the mount request mode Whether the mounting mode on the shared directory is the same as the mounting request mode: if the same, exit the current operation, if not, change the mounting mode of the current virtual file block on the shared directory to the above Mount request mode.
  • the virtual file system server further includes a rights management module, which is used to obtain the virtual file block issued by the virtual file system client when the virtual file block is mounted on the shared directory.
  • Permission parameters and modify the group permissions of the shared directory and the read and write permissions of the virtual file block according to the virtual file block permission parameters; the virtual file block permission parameters include the user UID/GID and the requested read and write permissions of the virtual file block.
  • the permission management module modifies the group permissions and read-write permissions of the virtual file block according to the permissions parameters of the virtual file block. After requesting read and write permissions, verify the correctness of the user UID/GID, if it is incorrect, roll back the current operation, if it is correct, modify the group permissions of the virtual file block according to the user UID/GID, and It is verified whether the requested read and write permission of the virtual file block is legal. If it is legal, the read and write permission of the virtual file block is modified according to the requested read and write permission of the virtual file. If it is illegal, the current operation is rolled back.
  • the virtual file system server further includes a service registration module, which is used to obtain all the virtual file block parameters sent by the virtual file system client, and to use it as the attribute of the shared directory.
  • a service registration module which is used to obtain all the virtual file block parameters sent by the virtual file system client, and to use it as the attribute of the shared directory.
  • the virtual file block registration information is added to the virtual file system client according to the obtained virtual file block parameters, and the virtual file block registration information includes the size of the virtual file block, Shared directory, group permissions of shared directories, read and write permissions of virtual file blocks, and mount request mode.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,优化系统应用于目标文件系统,优化系统包括用户态应用、网络文件系统和虚拟文件系统,虚拟文件系统包括虚拟文件系统客户端和虚拟文件系统服务端,网络文件系统包括网络文件系统服务器和网络文件系统客户端,用户态应用通过网络文件系统客户端挂载于网络文件系统服务器暴露的共享目录上;虚拟文件系统服务端中的文件块分配与格式化模块在其中一或多个目标文件系统的对象存储目标设备上,创建虚拟文件块用于存储小文件,虚拟文件块挂载于网络文件系统服务器暴露的共享目录上;本系统提升了大量小文件的读写性能,并保留分布式共享存储便于管理、可基于网络随处挂载的优点。

Description

KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统 技术领域
本发明涉及文件系统存储领域,更具体地,涉及一种KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统。
背景技术
当今互联网,数据呈现爆炸式增长,社交网络、移动通信、网络视频、电子商务等各种应用往往能产生亿级甚至十亿、百亿级的海量小文件。由于在元数据管理、访问性能、存储效率等方面面临巨大的挑战,海量小文件问题成为了业界公认的难题。
 在计算机存储领域,小文件的存储性能的优劣是影响整个文件系统存储性能的重要一方面,特别是在深度学习领域,以小图片和小文本为代表的大量小文件读写性能对整个深度学习训练过程的整体效率有着重要影响。
KUBERNETES是一个开源系统,用于容器化应用的自动部署、扩缩和管理。它旨在提供“跨主机集群的自动部署、扩展以及运行应用程序容器的平台”。它支持一系列容器工具, 包括DOCKER等。并将构成应用的容器按逻辑单位进行分组以便于管理和发现。容器占用资源少、部署快,每个应用可以被打包成一个容器镜像,每个应用与容器间成一对一关系也使容器有更大优势,使用容器可以在build或release的阶段,为应用创建容器镜像,因为每个应用不需要与其余的应用堆栈组合,也不依赖于生产环境基础结构,这使得从研发到测试、生产能提供一致环境。类似地,容器比虚拟机轻量、更“透明”,这更便于监控和管理。
KUBERNETES包括MASTER节点和普通(工作)节点,在每个普通节点上包含POD(容器组)、KUBELET和KUBE-PROXY,每个POD中包含一个或多个CONTAINER(容器),每个节点相当于一台虚拟机/物理机。
目标文件系统可为多种分布式文件系统,如Lustre文件系统,Lustre是一种集群存储体系结构,其核心组件就是lustre文件系统、该文件系统可在linux操作系统上运行,并提供了符合POSIX*标准的UNIX文件系统接口。Lustre架构普遍使用于高性能计算集群中,且可提供PB级存储和每秒数百GB的吞吐量。当Lustre文件系统存储用量逐渐增加时,继续在Lustre文件系统中存储小文件时随着文件量的增加,对小文件的读写效率将显著下降。在文件系统已用容量占比较大的场景下,对大量小文件的读写时,文件系统对其特定小文件元数据的检索需要在整个文件系统中进行,这是影响小文件存储性能的重要因素。
技术问题
本发明旨在克服上述现有技术的至少一种缺陷,提供一种KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,用于解决小文件存储和。
技术解决方案
本发明提供的技术方案是:
一种KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述优化系统应用于目标文件系统,所述优化系统包括用户态应用、网络文件系统和虚拟文件系统,所述虚拟文件系统包括虚拟文件系统客户端和虚拟文件系统服务端,所述网络文件系统包括网络文件系统服务器和网络文件系统客户端,所述用户态应用中包含所述网络文件系统客户端;
所述网络文件系统服务器和所述虚拟文件系统封装在同一镜像中,该镜像所在的容器为NFS特制镜像容器,所述用户态应用封装在用户态应用镜像中,所述用户态应用镜像所在的容器为用户态应用镜像容器,所述NFS特制镜像容器和所述用户态应用镜像容器均部署在KUBERNETES集群中,所述目标文件系统为所述KUBERNETES集群所使用的文件系统;
在所述用户态应用镜像容器被运行后,以及所述NFS特制镜像容器以PRIVILEGED=TRUE的方式被运行后,所述用户态应用、所述网络文件系统客户端、所述网络文件系统服务端以及所述虚拟文件系统均在同一KUBERNETES集群网络中,所述用户态应用通过网络文件系统客户端挂载于所述网络文件系统服务器暴露的共享目录上,所述用户态应用用于向所述虚拟文件系统客户端发送虚拟文件块创建请求;
所述虚拟文件系统客户端部署于所述目标文件系统的客户端上,所述虚拟文件系统客户端用于将所述用户态应用发出的所述虚拟文件块创建请求发送至所述虚拟文件系统服务端;所述虚拟文件系统服务端部署于所述目标文件系统的对象存储服务器上;所述虚拟文件系统服务端包括文件块分配与格式化模块,所述文件块创建与格式化模块用于根据所述虚拟文件系统客户端发出的虚拟文件块创建请求在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块;所述虚拟文件块用于存储小文件,所述虚拟文件块挂载于所述网络文件系统服务器暴露的共享目录上。
本发明提供的优化系统建立在KUBERNETES集群上,在该集群上部署有用户态应用镜像容器以及NFS特制镜像容器,该两个容器可处于任何KUBERNETES的节点上,封装有用户态应用的镜像设置在用户态应用镜像容器中,封装有网络文件系统服务器以及虚拟文件系统的镜像设置在NFS特制镜像容器中。所述优化系统应用于目标文件系统,目标文件系统为KUBERNETES集群所使用的文件系统,目标文件系统中包括对象存储服务器以及对象存储目标设备,对象存储服务器用于负责目标文件系统客户端与物理存储之间的交互及数据存储,该客户端通过对象存储服务器访问保存在对象存储目标设备中的文件数据。
在KUBERNETES环境下,运行用户态应用镜像容器以及NFS特制镜像容器,NFS特制镜像容器被运行后,虚拟文件系统中的虚拟文件系统客户端将部署于目标文件系统的客户端上,虚拟文件系统中的虚拟文件系统服务端将部署于目标文件系统的对象存储服务器上。用户态应用镜像容器被运行后,用户态应用向虚拟文件系统客户端发送虚拟文件块创建请求,虚拟文件系统客户端接收该请求后,通过目标文件系统的客户端,将其传输到部署在对象存储服务器上的虚拟文件系统服务端,虚拟文件系统服务端包括文件块分配与格式化模块,由于该模块处于对象存储服务器上,因此可对一个或多个对象存储目标设备进行管理,该模块获取虚拟文件系统客户端发出的虚拟文件块创建请求后,在一个或多个对象存储目标设备上创建并格式化虚拟文件块,用以存储小文件。
用户态应用通过应用本身包含的网络文件系统客户端,挂载于网络文件系统服务器暴露的共享目录上,网络文件系统服务器通过暴露共享目录,使网络文件系统客户端主机可以访问共享目录中的文件,且其访问过程与访问本地存储一样。同样挂载于该共享目录上的是上述创建的虚拟文件块,创建于对象存储目标设备上的虚拟文件块挂载于该共享目录上,通过网络文件系统的客户端与服务端,实现了用户态应用向虚拟文件块读写小文件的目的。
在KUBERNETES集群环境下,通过在一个或多个目标文件系统的对象存储目标设备上设置虚拟文件块,专门用于存储小文件,使小文件集中存储于虚拟文件块中,该虚拟文件系统可以极大地提升大量小文件的读写性能,而且保留了分布式共享存储便于管理、可基于网络随处挂载的优点。
进一步,所述用户态应用还用于向虚拟文件系统客户端发送虚拟文件块参数,所述虚拟文件系统客户端还用于将用户态应用发出的虚拟文件块参数发送至所述虚拟文件系统服务端,所述虚拟文件块参数包括虚拟文件块执行请求参数,所述虚拟文件系统服务端包括请求参数处理模块;所述请求参数处理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块执行请求参数,并根据所述虚拟文件块执行请求参数判断是否可创建虚拟文件块;
所述文件块创建与格式化模块用于根据所述虚拟文件系统客户端发出的虚拟文件块创建请求在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块,具体为:所述文件块创建与格式化模块用于在接收到所述虚拟文件系统客户端发出的虚拟文件块请求后,获取所述请求参数处理模块的判定结果,当所述请求参数处理模块判定可创建虚拟文件块时,在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块。
用户态应用还向虚拟文件系统客户端发送虚拟文件块创建时所需要的虚拟文件块参数,该虚拟文件块参数中包括虚拟文件块执行请求参数,所述的请求参数处理模块主要用于根据该参数判断虚拟文件块的请求是否可执行,具体地,该模块用于获取虚拟文件块参数中的虚拟文件块执行请求参数,根据该参数判断是否可创建虚拟文件块;上述的文件块创建与格式化模块则用于根据请求参数处理模块的判定结果决定是否创建文件块,当请求参数处理模块判定可创建虚拟文件块时,文件块创建与格式化模块才会在虚拟文件系统的对象存储目标设备上创建虚拟文件块。
进一步,所述虚拟文件块执行请求参数包括所述虚拟文件块的大小和所述虚拟文件块的格式;所述请求参数处理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块执行请求参数,并根据所述虚拟文件块执行请求参数判断是否可创建虚拟文件块,具体为:
所述请求参数处理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块的大小和所述虚拟文件块的格式,并根据接收到的所述虚拟文件块的大小检测所述目标文件系统的存储容量和所述目标系统的用户存储配额是否满足创建虚拟文件块的要求,如不满足,则报告错误信息;如满足,则根据接收到的所述虚拟文件块的格式检测所述格式是否适用于所述目标文件系统的格式,如适用,则判定可创建虚拟文件块,如不适用,则判定不可创建虚拟文件块。
虚拟文件块执行请求参数主要用于在向虚拟文件系统服务端发起虚拟文件块创建请求后提供具体的创建参数,虚拟文件块执行请求参数包括了用户所需创建的虚拟文件块的大小和虚拟文件块的格式,请求参数处理模块接收到该虚拟文件块执行请求参数后,根据虚拟文件块的大小,以及根据目标文件系统的存储容量和目标文件系统的用户存储配额判断目标文件系统是否满足虚拟文件块的创建,如不满足,表明不可创建虚拟文件块,报告错误信息,虚拟文件块创建失败,如满足,则根据虚拟文件块的格式,以及目标文件系统的文件格式判断目标文件系统是否适用于该虚拟文件块的构件,如适用,则判定可构建虚拟文件块,如不适用,则表明不可创建虚拟文件块,报告错误信息。
进一步,所述虚拟文件块参数还包括虚拟文件块挂载参数,所述虚拟文件系统服务端还包括挂载与管理模块,所述挂载与管理模块用于获取所述虚拟文件块挂载请求参数,并用于根据所述虚拟文件块挂载请求参数检测所述虚拟文件块是否已挂载于所述共享目录上:如是,则退出当前操作,如否,则判断所述虚拟文件块挂载参数是否合法:如合法,则将所述虚拟文件块挂载于所述共享目录上,如不合法,则回滚当前操作。
用户态应用向虚拟文件系统客户端发送的虚拟文件块参数中还包括虚拟文件块挂载参数,所述的挂载与管理模块主要用于根据该参数执行虚拟文件块的挂载,具体地,该模块用于获取虚拟文件块参数中的虚拟文件块挂载参数,根据该参数检测虚拟文件块是否已挂载于共享目录上,如是,则无需再执行挂载操作,模块可退出当前的操作,如否,则模块需要判断该参数是否合法的参数,例如,参数中可能包含的挂载点是否合法的挂载点等等,如是,则可执行虚拟文件块的挂载,如否,则模块回滚当前操作,不进行虚拟文件块的挂载。
进一步,所述挂载与管理模块用于获取所述虚拟文件块挂载请求参数,并用于根据所述虚拟文件块挂载请求参数检测所述虚拟文件块是否已挂载于所述共享目录上:如是,则退出当前操作,具体为:所述虚拟文件块挂载请求参数包括挂载请求目录和挂载请求模式,所述挂载与管理模块用于获取所述挂载请求目录和所述挂载请求模式,并用于根据所述挂载请求目录检测所述虚拟文件块是否已挂载于所述共享目录上,如是,则判断当前虚拟文件块挂载于所述共享目录上的挂载模式与所述挂载请求模式是否相同:如相同,则退出当前操作,如不相同,则将当前虚拟文件块挂载于所述共享目录上的挂载模式更改为所述挂载请求模式,如不合法。
挂载与管理模块所获取的虚拟文件块挂载参数中,包括了共享目录以及挂载请求模式,共享目录是实现用户态应用向虚拟文件块读写小文件的必要桥梁,挂载请求模式即虚拟文件块挂载于共享目录时的模式。挂载与管理模块在获取了上述两种参数后,根据共享目录检测虚拟文件块是否已挂载于共享目录上时,如是,则需要进一步判断当前虚拟文件块挂载于共享目录上的挂载模式与挂载请求模式是否相同,如相同,则无需对现有的挂载作任何改变,模块退出当前操作,如不相同,则按照挂载请求模式更改当前虚拟文件块的挂载模式。
进一步,所述虚拟文件块参数还包括虚拟文件块权限参数,所述虚拟文件系统服务端还包括权限管理模块,所述权限管理模块用于当所述虚拟文件块挂载于所述共享目录上时,获取所述虚拟文件块权限参数,并根据所述虚拟文件块权限参数修改所述共享目录的属组权限和虚拟文件块的读写权限。
权限管理模块主要用于修改共享目录的属组权限和虚拟文件块的读写权限,属组权限即指可读写文件的所属用户和组,读写权限即指文件可被用户读取或写入的权限,用户态应用向虚拟文件系统客户端发送虚拟文件块权限参数,虚拟文件系统服务端所包括的权限管理模块用于获取该参数,并根据该参数修改虚拟文件块的属组权限和读写权限,使用户更有效地利用虚拟文件块管理小文件。
进一步,所述虚拟文件块权限参数包括用户UID/GID和所述虚拟文件块的请求读写权限;所述权限管理模块用于根据所述虚拟文件块权限参数修改所述共享目录的属组权限和所述虚拟文件块的读写权限,具体为:所述权限管理模块用于验证所述用户UID/GID的正确性,如不正确,则回滚当前操作,如正确,则根据所述用户UID/GID修改所述共享目录的属组权限,并验证虚拟文件块的请求读写权限是否合法,如合法,则根据虚拟文件的请求读写权限修改所述虚拟文件块的读写权限,如不合法,则回滚当前操作限。
权限管理模块在获取虚拟文件块权限参数后,需要验证其中参数的正确性,虚拟文件块权限参数还包括用户UID/GID,即指用户的ID以及用户所属组ID,权限管理模块首先验证权限参数中用户UID/GID的正确性,如参数不正确,模块则需要回滚当前操作;如参数正确,根据用户UID/GID修改共享目录的属组权限,并验证虚拟文件块的请求读写权限是否合法,如合法,则根据虚拟文件的请求读写权限修改所述虚拟文件块的读写权限,如不合法,则回滚当前操作;虚拟文件块权限参数还包括虚拟文件块的请求读写权限,请求读写权限即指用户请求设置对虚拟文件块的读写权限,权限管理模块还用于根据该请求读写权限修改虚拟文件块的读写权限,使用户态应用可对虚拟文件块中的小文件进行读写存储。
进一步,所述虚拟文件系统服务端还包括服务注册模块,所述服务注册模块用于获取所有所述虚拟文件块参数,并用于当所述共享目录的属组权限和所述虚拟文件块的读写权限已修改时,根据所获取的所述虚拟文件块参数向所述虚拟文件系统客户端中添加虚拟文件块注册信息。
服务注册模块主要用于在虚拟文件系统客户端中添加虚拟文件块的注册信息,具体地,服务注册模块用于获取虚拟文件块参数,在权限管理模块对用共享目录的属组权限以及虚拟文件块的读写权限进行修改后,服务注册模块将获取到的虚拟文件块参数作为虚拟文件块的注册信息,添加至虚拟文件系统客户端,以便在虚拟文件系统客户端对虚拟文件块进行管理以及查看其详细信息。
进一步,虚拟文件块注册信息包括所述虚拟文件块的大小、所述共享目录、所述共享目录的属组权限、所述虚拟文件块的读写权限和所述挂载请求模式。
服务注册模块在获取虚拟文件块参数后,从中选取虚拟文件块的大小、虚拟文件块挂载的共享目录、共享目录的属组权限、虚拟文件块的读写权限以及虚拟文件块挂载于共享目录的挂载请求模式,作为虚拟文件块注册信息的主要内容,有利于用户态应用通过虚拟文件系统客户端管理虚拟文件块。
有益效果
与现有技术相比,本发明的有益效果为:
(1)在目标文件系统中创建虚拟文件夹,并通过网络文件系统使用户态应用能够在虚拟文件块中读写小文件,将小文件集中存储于虚拟文件夹方便小文件的管理和读写,本发明的虚拟文件系统可以极大地提升大量小文件的读写性能,而且保留了分布式共享存储便于管理、可基于网络随处挂载的优点。
(2)通过隐藏privileged=true容器可以执行虚拟文件系统的创建、格式化和挂载操作、而由于其隐藏使得用户无法直接访问该容器,可以避免用户实际应用容器可无限制使用GPU资源的问题;该隐藏容器中使用NFS文件系统服务,当用户实际应用需要虚拟文件系统服务时将在用户应用中执行NFS文件系统的挂载,从而通过中转的方式使用虚拟文件系统工具。
附图说明
图1为本发明实施例1中KUBERNETES集群的容器分布示意图。
图2为本发明实施例1中KUBERNETES集群上优化系统与目标文件系统的交互示意图。
图3为本发明实施例1中虚拟文件系统服务端的结构示意图。
图4为本发明实施例1中请求参数处理模块的处理流程图。
图5为本发明实施例1中挂载与管理模块的处理流程图。
图6为本发明实施例1中请权限管理模块的处理流程图
本发明的实施方式
本发明附图仅用于示例性说明,不能理解为对本发明的限制。为了更好说明以下实施例,附图某些部件会有省略、放大或缩小,并不代表实际产品的尺寸;对于本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的。
实施例 1
本实施例提供一种KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,该优化系统应用于KUBERNETES集群的文件系统即目标文件系统上,目标文件系统中包括对象存储服务器以及对象存储目标设备,对象存储服务器用于负责目标文件系统客户端与物理存储之间的交互及数据存储,该客户端通过对象存储服务器访问保存在对象存储目标设备中的文件数据。
本实施例提供的优化系统包括用户态应用、网络文件系统和虚拟文件系统,虚拟文件系统包括虚拟文件系统客户端和虚拟文件系统服务端,网络文件系统包括网络文件系统服务器和网络文件系统客户端,网络文件系统客户端部署在所述用户态应用中;
如图1所示,在KUBERNETES集群中,网络文件系统服务器和虚拟文件系统封装在同一镜像中,该镜像为NFS特制镜像,其所在的容器为NFS特制镜像容器,用户态应用封装在用户态应用镜像中,其所在的容器为用户态应用镜像容器;
以KUBERNETES-DEPLOYMENT的方式运行用户态应用镜像容器以及NFS特制镜像容器后,其中,以PRIVILEGED=TRUE的权限方式运行NFS特制镜像容器,以KUBERNETES-SERVICE的方式使NFS特制镜像容器中的网络文件系统服务器暴露网络文件服务挂载点,即共享目录。
如图2所示,用户态应用将用于向虚拟文件系统客户端发送虚拟文件块创建请求,用户态应用通过应用本身包含的网络文件系统客户端,用户态应用利用网络文件系统客户端通过VOLUME卷挂载于网络文件系统服务器暴露的共享目录上;虚拟文件系统客户端部署于目标文件系统的客户端上,虚拟文件系统客户端将用于将用户态应用发出的虚拟文件块创建请求发送至虚拟文件系统服务端;虚拟文件系统服务端部署于目标文件系统的对象存储服务器上;
虚拟文件系统服务端中包括文件块分配与格式化模块,由于该模块处于对象存储服务器上,因此可对一个或多个对象存储目标设备进行管理,该模块用于在一个或多个对象存储目标设备上创建并格式化虚拟文件块。在本实施例中,所述文件块创建与格式化模块在接收到虚拟文件系统客户端发出的虚拟文件块创建请求后,在其中一目标文件系统的对象存储目标设备X上创建并格式化虚拟文件块,虚拟文件块用于存储小文件。
虚拟文件块与用户态应用一样挂载于网络文件系统服务器暴露的共享目录上,由此实现了用户态应用通过网络文件系统向虚拟文件块中读写存储小文件。在KUBERNETES集群环境下,通过在一个或多个目标文件系统的对象存储目标设备上设置虚拟文件块,专门用于存储小文件,使小文件集中存储于虚拟文件块中,能够更有效率地管理小文件以及提高小文件存储读写的效率。
优选地,如图3所示,虚拟文件系统服务端还包括请求参数处理模块,所述用户态应用还用于向虚拟文件系统客户端发送虚拟文件块参数,所述虚拟文件系统客户端还用于将用户态应用发出的虚拟文件块参数发送至所述虚拟文件系统服务端,所述虚拟文件块参数中包括虚拟文件块执行请求参数,该虚拟文件块执行请求参数中包括虚拟文件块的大小和虚拟文件块的格式,请求参数处理模块用于获取虚拟文件块的大小和虚拟文件块的格式,并根据所述虚拟文件块执行请求参数判断是否可创建虚拟文件块;
所述文件块创建与格式化模块用于根据所述虚拟文件系统客户端发出的虚拟文件块创建请求用于在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块,具体为:所述文件块创建与格式化模块用于在接收到所述虚拟文件系统客户端发出的虚拟文件块请求后,获取所述请求参数处理模块的判定结果,当所述请求参数处理模块判定可创建虚拟文件块时,在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块。
如图4所示,请求参数处理模块具体的判断过程为:根据所述虚拟文件块的大小检测目标文件系统的存储容量和目标系统的用户存储配额是否满足创建虚拟文件块的要求,如不满足,则报告错误信息;如满足,则根据虚拟文件块的格式检测格式是否适用于目标文件系统的格式,如适用,则判定可创建虚拟文件块,如不适用,则报告错误信息。
优选地,如图3所示,虚拟文件系统服务端还包括挂载与管理模块,虚拟文件块参数还包括虚拟文件块挂载参数,虚拟文件块挂载请求参数包括所述共享目录和挂载请求模式,挂载与管理模块用于获取虚拟文件系统客户端发出的共享目录和挂载请求模式,并用于根据上述的两个参数执行如下操作:
如图5所示,挂载与管理模块根据共享目录检测所述虚拟文件块是否已挂载于共享目录上:如没有挂载在共享目录上,则判断共享目录和挂载请求模式是否合法:如合法,则将所述虚拟文件块挂载于所述共享目录上,如不合法,则回滚当前操作;如已挂载在共享目录上,根据挂载请求模式判断当前虚拟文件块挂载于共享目录上的挂载模式与挂载请求模式是否相同:如相同,则退出当前操作,如不相同,则将当前虚拟文件块挂载于所述共享目录上的挂载模式更改为所述挂载请求模式。
优选地,如图3所示,虚拟文件系统服务端还包括权限管理模块,权限管理模块用于当虚拟文件块挂载于共享目录上时,获取所述虚拟文件系统客户端发出的虚拟文件块权限参数,并根据虚拟文件块权限参数修改共享目录的属组权限和虚拟文件块的读写权限;虚拟文件块权限参数包括用户UID/GID和虚拟文件块的请求读写权限。
如图6所示,权限管理模块根据虚拟文件块权限参数修改虚拟文件块的属组权限和读写权限,具体过程为:在获取虚拟文件块权限参数中的用户UID/GID和虚拟文件块的请求读写权限后,验证所述用户UID/GID的正确性,如不正确,则回滚当前操作,如正确,则根据所述用户UID/GID修改所述虚拟文件块的属组权限,并验证虚拟文件块的请求读写权限是否合法,如合法,则根据虚拟文件的请求读写权限修改所述虚拟文件块的读写权限,如不合法,则回滚当前操作。
优选地,如图3所示,虚拟文件系统服务端还包括服务注册模块,服务注册模块用于获取所述虚拟文件系统客户端发出的所有所述虚拟文件块参数,并用于当共享目录的属组权限和虚拟文件块的读写权限已修改时,根据所获取的虚拟文件块参数向虚拟文件系统客户端中添加虚拟文件块注册信息,所述虚拟文件块注册信息包括虚拟文件块的大小、共享目录、共享目录的属组权限、虚拟文件块的读写权限和挂载请求模式。
显然,本发明的上述实施例仅仅是为清楚地说明本发明技术方案所作的举例,而并非是对本发明的具体实施方式的限定。凡在本发明权利要求书的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明权利要求的保护范围之内。 

Claims (9)

  1. 一种KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述优化系统应用于目标文件系统,所述优化系统包括用户态应用、网络文件系统和虚拟文件系统,所述虚拟文件系统包括虚拟文件系统客户端和虚拟文件系统服务端,所述网络文件系统包括网络文件系统服务器和网络文件系统客户端,所述用户态应用中包含所述网络文件系统客户端;
    所述网络文件系统服务器和所述虚拟文件系统封装在同一镜像中,该镜像所在的容器为NFS特制镜像容器,所述用户态应用封装在用户态应用镜像中,所述用户态应用镜像所在的容器为用户态应用镜像容器,所述NFS特制镜像容器和所述用户态应用镜像容器均部署在KUBERNETES集群中,所述目标文件系统为所述KUBERNETES集群所使用的文件系统;
    在所述用户态应用镜像容器被运行后,以及所述NFS特制镜像容器以PRIVILEGED=TRUE的方式被运行后,所述用户态应用、所述网络文件系统客户端、所述网络文件系统服务端以及所述虚拟文件系统均在同一KUBERNETES集群网络中,所述用户态应用通过网络文件系统客户端挂载于所述网络文件系统服务器暴露的共享目录上,所述用户态应用用于向所述虚拟文件系统客户端发送虚拟文件块创建请求;所述虚拟文件系统客户端部署于所述目标文件系统的客户端上,所述虚拟文件系统客户端用于将所述用户态应用发出的所述虚拟文件块创建请求发送至所述虚拟文件系统服务端;所述虚拟文件系统服务端部署于所述目标文件系统的对象存储服务器上;所述虚拟文件系统服务端包括文件块分配与格式化模块,所述文件块创建与格式化模块用于根据所述虚拟文件系统客户端发出的虚拟文件块创建请求在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块;所述虚拟文件块用于存储小文件,所述虚拟文件块挂载于所述网络文件系统服务器暴露的共享目录上。
  2. 根据权利要求1所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述用户态应用还用于向虚拟文件系统客户端发送虚拟文件块参数,所述虚拟文件系统客户端还用于将用户态应用发出的虚拟文件块参数发送至所述虚拟文件系统服务端,所述虚拟文件块参数中包括虚拟文件块执行请求参数,所述虚拟文件系统服务端还包括请求参数处理模块;所述请求参数处理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块执行请求参数,并根据所述虚拟文件块执行请求参数判断是否可创建虚拟文件块;所述文件块创建与格式化模块用于根据所述虚拟文件系统客户端发出的虚拟文件块创建请求用于在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块,具体为:所述文件块创建与格式化模块用于在接收到所述虚拟文件系统客户端发出的虚拟文件块请求后,获取所述请求参数处理模块的判定结果,当所述请求参数处理模块判定可创建虚拟文件块时,在其中一或多个所述目标文件系统的对象存储目标设备上创建并格式化虚拟文件块。
  3. 根据权利要求2所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件块执行请求参数包括所述虚拟文件块的大小和所述虚拟文件块的格式;所述请求参数处理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块执行请求参数,并根据所述虚拟文件块执行请求参数判断是否可创建虚拟文件块,具体为:所述请求参数处理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块的大小和所述虚拟文件块的格式,并根据接收到的所述虚拟文件块的大小检测所述目标文件系统的存储容量和所述目标系统的用户存储配额是否满足创建虚拟文件块的要求,如不满足,则报告错误信息;如满足,则根据接收到的所述虚拟文件块的格式检测所述格式是否适用于所述目标文件系统的格式,如适用,则判定可创建虚拟文件块,如不适用,则报告错误信息。
  4. 根据权利要求2所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件块参数还包括虚拟文件块挂载参数,所述虚拟文件系统服务端还包括挂载与管理模块,所述挂载与管理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块挂载请求参数,并用于根据所述虚拟文件块挂载请求参数检测所述虚拟文件块是否已挂载于所述共享目录上:如是,则退出当前操作,如否,则判断所述虚拟文件块挂载参数是否合法:如合法,则将所述虚拟文件块挂载于所述共享目录上,如不合法,则回滚当前操作。
  5. 根据权利要求4所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件块挂载请求参数包括所述共享目录和挂载请求模式;所述挂载与管理模块用于获取所述虚拟文件系统客户端发出的所述虚拟文件块挂载请求参数,并用于根据所述虚拟文件块挂载请求参数检测所述虚拟文件块是否已挂载于所述共享目录上:如是,则退出当前操作,具体为:所述挂载与管理模块用于获取所述虚拟文件系统客户端发出的所述挂载请求目录和所述挂载请求模式,并用于根据所述共享目录检测所述虚拟文件块是否已挂载于所述共享目录上,如是,则根据所述挂载请求模式判断当前虚拟文件块挂载于所述共享目录上的挂载模式与所述挂载请求模式是否相同:如相同,则退出当前操作,如不相同,则将当前虚拟文件块挂载于所述共享目录上的挂载模式更改为所述挂载请求模式。
  6. 根据权利要求4所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件块参数还包括虚拟文件块权限参数,所述虚拟文件系统服务端还包括权限管理模块,所述权限管理模块用于当所述虚拟文件块挂载于所述共享目录上时,获取所述虚拟文件系统客户端发出的所述虚拟文件块权限参数,并根据所述虚拟文件块权限参数修改所述共享目录的属组权限和虚拟文件块的读写权限。
  7. 根据权利要求6所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件块权限参数包括用户UID/GID和所述虚拟文件块的请求读写权限;
    所述权限管理模块用于根据所述虚拟文件块权限参数修改所述共享目录的属组权限和虚拟文件块的读写权限,具体为:所述权限管理模块用于验证所述用户UID/GID的正确性,如正确,则根据所述用户UID/GID修改所述共享目录的属组权限,如不正确,则回滚当前操作;所述权限管理模块还用于根据所述虚拟文件块的请求读写权限修改所述虚拟文件块的读写权限。
  8. 根据权利要求6所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件系统服务端还包括服务注册模块,所述服务注册模块用于获取所述虚拟文件系统客户端发出的所有所述虚拟文件块参数,并用于当所述虚拟文件块的属组权限和读写权限已修改时,根据所获取的所述虚拟文件块参数向所述虚拟文件系统客户端中添加虚拟文件块注册信息。
  9. 根据权利要求8所述的KUBERNETES用户态应用中基于虚拟文件系统的小文件存储优化系统,其特征在于,所述虚拟文件块注册信息包括所述虚拟文件块的大小、所述共享目录、所述共享目录的属组权限、所述虚拟文件块的读写权限和所述挂载请求模式。
     
PCT/CN2021/079582 2020-03-19 2021-03-08 Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统 WO2021185109A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010195318.5 2020-03-19
CN202010195318.5A CN111475469B (zh) 2020-03-19 2020-03-19 Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统

Publications (1)

Publication Number Publication Date
WO2021185109A1 true WO2021185109A1 (zh) 2021-09-23

Family

ID=71747589

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/079582 WO2021185109A1 (zh) 2020-03-19 2021-03-08 Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统

Country Status (6)

Country Link
US (1) US11409712B2 (zh)
CN (1) CN111475469B (zh)
AU (1) AU2021101420A4 (zh)
LU (1) LU102666B1 (zh)
WO (1) WO2021185109A1 (zh)
ZA (1) ZA202101819B (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475469B (zh) * 2020-03-19 2021-12-14 中山大学 Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统
CN111966471B (zh) * 2020-10-21 2022-03-08 北京首都在线科技股份有限公司 访问方法、装置、电子设备及计算机存储介质
CN112650727B (zh) * 2020-12-09 2022-09-16 湖南麒麟信安科技股份有限公司 一种面向网络存储系统的通用权限与配额管理系统与方法
CN112632011A (zh) * 2020-12-30 2021-04-09 上海中通吉网络技术有限公司 基于Kubernetes的数据读写方法、装置、系统及设备
CN113342280A (zh) * 2021-06-25 2021-09-03 航天云网科技发展有限责任公司 基于Kubernetes的存储配置方法、系统及电子设备
CN113918519A (zh) * 2021-09-06 2022-01-11 中国长城科技集团股份有限公司 一种文件夹挂载方法、装置及终端设备
CN114048185B (zh) * 2021-11-18 2022-09-02 北京聚存科技有限公司 一种分布式文件系统中海量小文件透明打包存储与访问的方法
CN114064594B (zh) * 2021-11-22 2023-09-22 马上消费金融股份有限公司 数据处理方法和装置
CN114780042B (zh) * 2022-05-06 2023-07-28 安超云软件有限公司 提升nas存储性能的方法及装置、电子设备和存储介质
CN114676093B (zh) * 2022-05-25 2022-09-02 天津联想协同科技有限公司 一种文件管理方法、装置、电子设备及存储介质
CN115150185A (zh) * 2022-07-25 2022-10-04 杭州东方通信软件技术有限公司 一种基于多密码控制用户目录与权限的方法及装置
CN115242783B (zh) * 2022-09-22 2022-11-29 中科方德软件有限公司 传输方法、装置、电子设备和介质
CN116578393B (zh) * 2023-07-11 2023-09-29 苏州浪潮智能科技有限公司 一种容器使用加密目录的方法、系统、设备以及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7418439B2 (en) * 2000-03-17 2008-08-26 Twin Peaks Software, Inc. Mirror file system
CN110647497A (zh) * 2019-07-19 2020-01-03 广东工业大学 一种基于hdfs的高性能文件存储与管理系统
CN110678837A (zh) * 2017-04-28 2020-01-10 Netapp股份有限公司 用于对数据块执行全局重复数据删除的方法及其装置
CN110865989A (zh) * 2019-11-22 2020-03-06 浪潮电子信息产业股份有限公司 一种大规模计算集群的业务处理方法
CN111475469A (zh) * 2020-03-19 2020-07-31 中山大学 Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7818535B1 (en) * 2007-06-30 2010-10-19 Emc Corporation Implicit container per version set
US8296398B2 (en) * 2008-04-29 2012-10-23 Overland Storage, Inc. Peer-to-peer redundant file server system and methods
CN105843841A (zh) * 2016-03-07 2016-08-10 青岛理工大学 一种小文件存储方法和系统
US10419537B1 (en) * 2016-03-24 2019-09-17 EMC IP Holding Company LLC Architecture for a converged compute and file system within network-attached storage clusters
CN106302733A (zh) * 2016-08-16 2017-01-04 浪潮(北京)电子信息产业有限公司 一种分布式集群融合nfs协议的实现方法及装置
CN106951529A (zh) * 2017-03-21 2017-07-14 郑州云海信息技术有限公司 一种海量小文件的管理方法及系统
CN108900606A (zh) * 2018-06-28 2018-11-27 郑州云海信息技术有限公司 一种跨系统实现数据共享的方法、装置及设备
US10949384B2 (en) * 2018-07-03 2021-03-16 Cohesity, Inc. Using a storage system to optimize and maintain the metadata associated with a plurality of small files
CN110515920A (zh) * 2019-08-30 2019-11-29 北京浪潮数据技术有限公司 一种基于Hadoop的海量小文件存取方法和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7418439B2 (en) * 2000-03-17 2008-08-26 Twin Peaks Software, Inc. Mirror file system
CN110678837A (zh) * 2017-04-28 2020-01-10 Netapp股份有限公司 用于对数据块执行全局重复数据删除的方法及其装置
CN110647497A (zh) * 2019-07-19 2020-01-03 广东工业大学 一种基于hdfs的高性能文件存储与管理系统
CN110865989A (zh) * 2019-11-22 2020-03-06 浪潮电子信息产业股份有限公司 一种大规模计算集群的业务处理方法
CN111475469A (zh) * 2020-03-19 2020-07-31 中山大学 Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHAI, YARONG ET AL.: "Filebeat Kubernetes (Analysis System Based on Filebeat Automated Collection of Kubernetes Log", COMPUTER SYSTEMS & APPLICATIONS, vol. 27, no. 9, 30 September 2018 (2018-09-30), pages 81 - 86, XP055852130, ISSN: 1003-3254, DOI: 10.15888/j.cnki.csa.006528 *
ZHANG, RONG: "HDFS (Research And Optimization of Mass Small Files Based on HDFS", CHINESE MASTER'S THESES FULL-TEXT DATABASE, INFORMATION SCIENCE AND TECHNOLOGY, 15 February 2017 (2017-02-15), XP055852111, ISSN: 1674-0246 *

Also Published As

Publication number Publication date
US20210294778A1 (en) 2021-09-23
CN111475469A (zh) 2020-07-31
US11409712B2 (en) 2022-08-09
ZA202101819B (en) 2021-05-26
AU2021101420A4 (en) 2021-05-13
CN111475469B (zh) 2021-12-14
LU102666B1 (en) 2021-09-20

Similar Documents

Publication Publication Date Title
WO2021185109A1 (zh) Kubernetes用户态应用中基于虚拟文件系统的小文件存储优化系统
JP6607901B2 (ja) スケーラブル分散ストレージアーキテクチャ
JP6798960B2 (ja) 仮想化ストレージエリアネットワークのための仮想ディスクブループリント
JP5276218B2 (ja) リアルタイムでlunをファイルに、またはファイルをlunに変換すること
CN110046026B (zh) 云主机指定虚拟磁盘限速方法、计算设备及云平台
US20180060143A1 (en) Distributed shared log storage system having an adapter for heterogenous big data workloads
JP2013539119A (ja) オフロード・リードおよびライト
CN111488198B (zh) 一种超融合环境下的虚拟机调度方法、系统及介质
WO2011120791A1 (en) Transmission of map-reduce data based on a storage network or a storage network file system
CN109933312B (zh) 一种有效降低容器化关系型数据库i/o消耗的方法
CN105892943A (zh) 一种分布式存储系统中块存储数据的访问方法及系统
WO2021057108A1 (zh) 一种读数据方法、写数据方法及服务器
CN106648462B (zh) 数据存储方法及装置
US11740925B2 (en) Method and apparatus for online migration of multi-disk virtual machine into different storage pools
WO2019148841A1 (zh) 一种分布式存储系统、数据处理方法和存储节点
US7725654B2 (en) Affecting a caching algorithm used by a cache of storage system
US11157456B2 (en) Replication of data in a distributed file system using an arbiter
US20150244803A1 (en) Block Device-Based Virtual Storage Service System and Method
Nagle et al. The ANSI T10 object-based storage standard and current implementations
CN107329798A (zh) 数据复制的方法、装置和虚拟化系统
WO2024021417A1 (zh) 数据账户创建方法及装置
WO2023273803A1 (zh) 一种认证方法、装置和存储系统
Rodriguez et al. Unifying the data center caching layer: Feasible? profitable?
US11586353B2 (en) Optimized access to high-speed storage device
CN113553314A (zh) 一种超融合系统的服务处理方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21772084

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 060223)

122 Ep: pct application non-entry in european phase

Ref document number: 21772084

Country of ref document: EP

Kind code of ref document: A1