WO2022033120A1 - 一种文件存储的管理方法、系统、设备以及介质 - Google Patents

一种文件存储的管理方法、系统、设备以及介质 Download PDF

Info

Publication number
WO2022033120A1
WO2022033120A1 PCT/CN2021/096408 CN2021096408W WO2022033120A1 WO 2022033120 A1 WO2022033120 A1 WO 2022033120A1 CN 2021096408 W CN2021096408 W CN 2021096408W WO 2022033120 A1 WO2022033120 A1 WO 2022033120A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
mount
management platform
file storage
address
Prior art date
Application number
PCT/CN2021/096408
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 苏州浪潮智能科技有限公司
Priority to US18/020,812 priority Critical patent/US20230305996A1/en
Publication of WO2022033120A1 publication Critical patent/WO2022033120A1/zh

Links

Images

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/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/1827Management specifically adapted to NAS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Definitions

  • the present invention relates to the field of NFS (Network File System, network file system), in particular to a file storage management method, system, device and storage medium.
  • NFS Network File System, network file system
  • an embodiment of the present invention proposes a file storage management method, including the following steps:
  • the file system In response to the normal heartbeat between the address of the cloud host and the address of the file storage to be mounted, the file system is mounted.
  • using the proxy service to send a mount request to the management platform and receive the mount parameters returned by the management platform further comprising:
  • the export path of the file storage returned by the management platform based on the least connection algorithm is received.
  • the method further includes:
  • performing remounting according to the configuration file further comprising:
  • remounting is performed according to the configuration file.
  • the method further includes:
  • the proxy service modifies the configuration file and disconnects the file storage in response to receiving the unmounting instruction issued by the management platform.
  • the method further includes:
  • the management platform records the export path, the mounted cloud host, and the mounting time in a table.
  • using the proxy service to send a mount request to the management platform and receive the mount parameters returned by the management platform further comprising:
  • the management platform in response to receiving the mount request, utilizes the Manila service to select the export path of the file storage based on the least connection algorithm, and records the mount parameters including the export path of the file storage in the table;
  • the Nova service returns the export path to the proxy service on the cloud host.
  • an embodiment of the present invention further provides a file storage management system, including:
  • the sending module is configured to use the proxy service to send a mount request to the management platform and receive the mount parameters returned by the management platform;
  • the recording module is configured to record the mounting parameters in the configuration file of the proxy service
  • the determination module is configured to determine the storage address of the file to be mounted according to the configuration file
  • a mounting module which is configured to mount the file system in response to a normal heartbeat between the address of the cloud host and the address of the file storage to be mounted.
  • an embodiment of the present invention further provides a computer device, including:
  • a memory wherein the memory stores a computer program that can be executed on the processor, and is characterized in that, when the processor executes the program, the processor executes the steps of any of the above-mentioned file storage management methods.
  • an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor Perform the steps of any of the file storage management methods described above.
  • the present invention has one of the following beneficial technical effects: the solution proposed by the present invention can improve the management capability of the management platform for the file system mounted on the cloud host, and the file system can be conveniently used without any operation by the user on the cloud host. storage.
  • FIG. 1 is a schematic flowchart of a management method for file storage provided by an embodiment of the present invention
  • FIG. 2 is a flow chart of file storage mounting/unloading performed by a proxy service provided by an embodiment of the present invention
  • FIG. 3 is a flow chart of file storage mounting/unloading performed by a management platform provided by an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a file storage management system provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a computer device provided by an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present invention.
  • Manila provides a file storage service in the cloud platform OpenStack (an open source cloud computing management platform project).
  • File storage NFS network file system
  • network file system is one of the file systems supported by FreeBSD (a UNIX-like operating system).
  • FreeBSD a UNIX-like operating system
  • an embodiment of the present invention proposes a file storage management method, as shown in FIG. 1 and FIG. 2 , which may include the steps:
  • S1 use the proxy service to send a mount request to the management platform and receive the mount parameters returned by the management platform;
  • the solution proposed by the present invention can improve the management capability of the management platform for the file system mounted on the cloud host, and the file storage can be conveniently used without any operation performed by the user on the cloud host.
  • step S1 using the proxy service to send a mount request to the management platform and receive the mount parameters returned by the management platform, further comprising:
  • the export path of the file storage returned by the management platform based on the least connection algorithm is received.
  • step S1 utilizes the proxy service to send the mount request to the management platform and receives the mount parameter returned by the management platform, and can further include:
  • the management platform in response to receiving the mount request, utilizes the Manila service to select the export path of the file storage based on the least connection algorithm, and records the mount parameters including the export path of the file storage in the table;
  • the Manila service forwards the export path to Nova (a component of OpenStack that provides computing services in OpenStack) service;
  • the Nova service returns the export path to the proxy service on the cloud host.
  • the mount request (os-share-attach) is passed through Manila REST (Representational State Transfer, presentation layer state conversion)
  • the API Application Programming Interface
  • the Manila service uses the Least Connections algorithm to automatically obtain the export path of the file storage, and then calls the Nova service to pass the libvirt of the host where the cloud host is located (for Open-source APIs for managing virtualization platforms, background programs and management tools) call the API of the agent service in the cloud host to forward the request to the agent service (Agent) in the cloud host, and the Agent records the mount information (export path) to the cloud host.
  • the configuration file for the proxy service is
  • the Least Connections algorithm can be used to select the mount. The mount point with the least number of times is mounted, so as to ensure the load balance among the export paths.
  • S4 in response to the normal heartbeat between the address of the cloud host and the address of the file storage to be mounted, mount the file system, specifically, after saving the mount parameters through the Agent, execute the mount
  • the linux system can execute the mount command, and the Windows system realizes the mapping of network drives by calling the dynamic link library of the windows sdk (software development kit, software development kit).
  • the method further includes:
  • the management platform records the export path, the mounted cloud host, and the mounting time in a table.
  • the Manila service can add an attachments (abbreviation for attachments) table that records the mount information, and extend the os-share-attach interface to export the path (export_path), mount point (mountpoint), etc.
  • the parameters are passed into the interface, and the mount time, export path, and mount point (cloud host) and other information are recorded in the attachments table, which is convenient for project administrators to view.
  • the table information enables the Manila service to save the mount information in the database and count the number of cloud hosts connected to each export path, so as to meet the requirements of the load balancing Least Connections algorithm.
  • the method further includes:
  • the Agent starts a timed thread (30s by default), parses the mount directory through the mount command, and periodically detects the mount status of the shared file storage. When the mount is detected The status is abnormal. Since the Agent has saved the mount parameters in the configuration file, it can try to mount it again according to the parameters in the configuration file.
  • the Linux system supports remounting and can complete automatic repair, and the Windows system can also complete the remapping.
  • performing remounting according to the configuration file further comprising:
  • remounting is performed according to the configuration file.
  • the Agent will not keep trying to mount until the heartbeat is normal and will remount . If the cloud host is restarted, the Agent will also be automatically started and the file storage will be automatically mounted.
  • the method further includes:
  • the proxy service modifies the configuration file and disconnects the file storage in response to receiving the unmounting instruction issued by the management platform.
  • the administrator on the management platform sees the attachments information, he can select a cloud host to unmount, which can be achieved by extending the Manila interface (os-share-deattach) to find the corresponding file storage
  • the cloud host attachment (short for attachment) information record the uninstall time, and mark it as deleted.
  • the agent inside the cloud host receives the uninstall request, it modifies the configuration file and disconnects the connection with the underlying file storage, and the agent releases the monitoring of the file storage.
  • a file storage may be created through the management platform, and a cloud host may be created by using an image with an Agent, or the Agent may be manually installed after the cloud host is created. It can provide different Agent installation packages based on Windows system and Linux system, and can provide unified C++ API to the outside world.
  • Service-oriented programming on Windows system lightweight applications can be realized based on Windows Service (service), and embedded in Windows system to start automatically; on Linux system, Agent is registered as a service unit (system daemon) managed by systemd (system daemon). service unit), and realize the self-starting of the boot service, which is embedded in the linux image. Agent realizes the functions of regular monitoring of shared file storage (modified by configuration file), automatic mounting, and automatic repair.
  • the solution proposed by the present invention can directly mount the file storage to the cloud host, and can automatically obtain the export path of the file storage.
  • the cloud platform sends the mount request to the Manila service through the Manila REST API, and records the mount information; then calls the Nova service (novaclient, nova client) to forward the request to the Agent in the cloud host, and the Agent records the request information to the configuration file.
  • the Agent In order to ensure the normal file storage mounting status, the Agent not only executes the mounting action, but also implements a timing detection mechanism.
  • the agent periodically queries the mounting status and the mounting status. If it is abnormal, it will try to remount and repair it to ensure the high availability of file storage. If there is no communication between the local machine and the remote file storage address, it will not try to mount it all the time, and it will be remounted until the heartbeat is normal. If the cloud host is restarted, the Agent will also be automatically started and the file storage will be automatically mounted.
  • the Manila service will save the mount information in the database, and count the number of cloud hosts connected to each export path, so as to meet the requirements of the load balancing Least Connections algorithm.
  • the project administrator can directly select the corresponding file storage, all the mounted cloud hosts will be displayed, and select a cloud host to uninstall.
  • the agent inside the cloud host will also change the configuration file synchronously, no longer monitor the file storage, and the cloud platform side will also delete the mount information. In this way, the shared file storage can be conveniently used without any operation by the user, and the ability of the project administrator on the management platform to manage the file storage is also improved.
  • an embodiment of the present invention further provides a file storage management system 400, as shown in FIG. 4, including:
  • a sending module 401 the sending module 401 is configured to send a mount request to the management platform by using the proxy service and receive the mount parameters returned by the management platform;
  • Recording module 402 the recording module 402 is configured to record the mounting parameters in the configuration file of the proxy service
  • the determining module 403 is configured to determine the storage address of the file to be mounted according to the configuration file;
  • the mounting module 404 is configured to mount the file system in response to the normal heartbeat between the address of the cloud host and the address of the file storage to be mounted.
  • an embodiment of the present invention further provides a computer device 501, including:
  • the memory 510 stores a computer program 511 that can be executed on the processor, and the processor 520 executes the steps of any of the above file storage management methods when executing the program.
  • an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer The program instructions 610, when executed by the processor, perform the steps of any of the above methods for managing file storage.
  • computer-readable storage media e.g. memory
  • volatile memory e.g., memory
  • non-volatile memory e.g., RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种文件存储的管理方法,包括以下步骤:利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;将所述挂载参数记录到代理服务的配置文件中;根据所述配置文件确定待挂载的文件存储的地址;响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。本发明还公开了一种系统、计算机设备以及可读存储介质。本发明提出的方案能够提高管理平台对云主机挂载的文件系统的管理能力,而且也不需要云主机上的用户做任何操作,就能够方便的使用文件存储。

Description

一种文件存储的管理方法、系统、设备以及介质
本申请要求于2020年08月14日提交中国国家知识产权局,申请号为202010821009.4,发明名称为“一种文件存储的管理方法、系统、设备以及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及NFS(Network File System,网络文件系统)领域,具体涉及一种文件存储的管理方法、系统、设备以及存储介质。
背景技术
在云平台操作系统上,用户可以通过Manila服务方便创建共享文件存储,最终将在对应driver(驱动程序)驱动完成底层共享文件目录的创建。若想在云主机内使用该文件存储,需要进入云主机,Linux(一种操作系统)系统手动执行mount(挂载)命令,将文件存储导出路径挂载到本地目录才能使用;Windows(一种操作系统)系统需要手动映射一个网络驱动器到一个分区,并且还需要账号密码认证才能够使用。并且如果遇到网络中断、云主机重启等异常状况还需要手动修复并且重新挂载文件存储导出路径。
随着云平台云主机的增加,可能越来越多的用户会挂载同一个文件存储的导出路径,所以目前云平台管理员无法控制,也无从知道到底有哪些云主机挂载了此文件存储的导出路径,导致了文件存储不可管理。
发明内容
有鉴于此,为了克服上述问题的至少一个方面,本发明实施例提出一种文件存储的管理方法,包括以下步骤:
利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;
将所述挂载参数记录到代理服务的配置文件中;
根据所述配置文件确定待挂载的文件存储的地址;
响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。
在一些实施例中,利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数,进一步包括:
接收所述管理平台基于最少连接算法返回的所述文件存储的导出路径。
在一些实施例中,方法还包括:
响应于成功挂载所述文件系统,定时检测挂载状态;
响应于挂载状态异常,根据所述配置文件进行重新挂载。
在一些实施例中,响应于挂载状态异常,根据所述配置文件进行重新挂载,进一步包括:
判断所述云主机的地址与所述待挂载的文件存储的地址之间的心跳是否正常;
响应于所述云主机的地址与所述待挂载的文件存储的地址之间的心跳恢复正常,根据所述配置文件进行重新挂载。
在一些实施例中,方法还包括:
所述代理服务响应于接收到所述管理平台下发的解除挂载的指令,修改所述配置文件并断开与所述文件存储的连接。
在一些实施例中,方法还包括:
所述管理平台将导出路径、挂载的云主机、挂载时间记录到表中。
在一些实施例中,利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数,进一步包括:
所述管理平台响应于接收到所述挂载请求,利用Manila服务基于最少连接算法选择文件存储的导出路径,并将包含文件存储的导出路径的挂载参数记录到表中;
所述Manila服务将所述导出路径转发到Nova服务;
所述Nova服务将所述导出路径返回所述云主机上的所述代理服务。
基于同一发明构思,根据本发明的另一个方面,本发明的实施例还提供了一种文件存储的管理系统,包括:
发送模块,所述发送模块配置为利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;
记录模块,所述记录模块配置为将所述挂载参数记录到代理服务的配置文件中;
确定模块,所述确定模块配置为根据所述配置文件确定待挂载的文件存储的地址;
挂载模块,所述挂载模块配置为响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。
基于同一发明构思,根据本发明的另一个方面,本发明的实施例还提供了一种计算机设备,包括:
至少一个处理器;以及
存储器,所述存储器存储有可在所述处理器上运行的计算机程序,其 特征在于,所述处理器执行所述程序时执行如上所述的任一种文件存储的管理方法的步骤。
基于同一发明构思,根据本发明的另一个方面,本发明的实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时执行如上所述的任一种文件存储的管理方法的步骤。
本发明具有以下有益技术效果之一:本发明提出的方案能够提高管理平台对云主机挂载的文件系统的管理能力,而且也不需要云主机上的用户做任何操作,就能够方便地使用文件存储。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为本发明的实施例提供的文件存储的管理方法的流程示意图;
图2为本发明的实施例提供的代理服务进行文件存储挂载/卸载的流程框图;
图3为本发明的实施例提供的管理平台进行文件存储挂载/卸载的流程框图;
图4为本发明的实施例提供的文件存储的管理系统的结构示意图;
图5为本发明的实施例提供的计算机设备的结构示意图;
图6为本发明的实施例提供的计算机可读存储介质的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。
需要说明的是,本发明实施例中Manila为云平台OpenStack(一种开源的云计算管理平台项目)中提供文件存储的服务。文件存储NFS:网络文件系统,网络文件系统是FreeBSD(一种类UNIX操作系统)支持的文件系统中的一种,通过使用NFS,用户和程序可以像访问本地文件一样访问远端系统上的文件。
根据本发明的一个方面,本发明的实施例提出一种文件存储的管理方法,如图1和图2所示,其可以包括步骤:
S1,利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;
S2,将所述挂载参数记录到代理服务的配置文件中;
S3,根据所述配置文件确定待挂载的文件存储的地址;
S4,响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。
本发明提出的方案能够提高管理平台对云主机挂载的文件系统的管理能力,而且也不需要云主机上的用户做任何操作,就能够方便的使用文件存储。
在一些实施例中,步骤S1,利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数,进一步包括:
接收所述管理平台基于最少连接算法返回的所述文件存储的导出路径。
在一些实施例中,步骤S1,利用代理服务向管理平台发送挂载请求并 接收所述管理平台返回的挂载参数,还可以进一步包括:
所述管理平台响应于接收到所述挂载请求,利用Manila服务基于最少连接算法选择文件存储的导出路径,并将包含文件存储的导出路径的挂载参数记录到表中;
所述Manila服务将所述导出路径转发到Nova(OpenStack的组件,在OpenStack中提供计算的服务)服务;
所述Nova服务将所述导出路径返回所述云主机上的所述代理服务。
具体的,如图3所示,在管理平台内,当接收到云主机发送的挂载请求后,将挂载请求(os-share-attach)通过Manila REST(Representational State Transfer,表现层状态转化)API(Application Programming Interface,应用程序接口)下发给Manila服务,Manila服务使用最少连接(Least Connections)算法自动获取文件存储的导出路径,然后调用Nova服务以通过云主机所在宿主机的libvirt(用于管理虚拟化平台的开源的API,后台程序和管理工具)调用云主机内的代理服务的API将请求转发给云主机内的代理服务(Agent),Agent记录挂载信息(导出路径)到云主机的代理服务的配置文件。
需要说明的是,由于通常一个文件存储的导出路径有多个,如果需要用户手动挂载的话,很难在各个导出路径间做到负载均衡,因此可以利用最少连接(Least Connections)算法选择挂载次数最少的挂载点进行挂载,从而保证导出路径之间的负载均衡。
在一些实施例中,S4,响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统,具体的,当通过Agent保存挂载参数后,执行挂载命令,其中,linux系统可以执行mount命令,Windows系统通过调用windows sdk(software development kit,软件开发工具包)的动态链接库实现映射网络驱动器。
在一些实施例中,方法还包括:
所述管理平台将导出路径、挂载的云主机、挂载时间记录到表中。
具体的,如图3所示,Manila服务中可以增加记录挂载信息的attments(attachments的简写)表,并且扩展os-share-attach接口,将导出路径(export_path),挂载点(mountpoint)等参数传入接口,attments表中记录挂载时间、导出路径、挂载点(云主机)等信息,方便项目管理员查看。并且当云主机挂载文件存储成功之后,通过扩展Manila原有API({project_id}/detail)接口,可以在查询文件存储时,展示对应的文件存储已挂载的云主机信息,即记录的attachments表信息,使得Manila服务能够将挂载信息保存至数据库内,并且统计各个导出路径已连接的云主机个数,以能够满足负载均衡Least Connections算法的要求。
在一些实施例中,方法还包括:
响应于成功挂载所述文件系统,定时检测挂载状态;
响应于挂载状态异常,根据所述配置文件进行重新挂载。
具体的,如图2所所示,当挂载成功后,Agent启动一个定时线程(默认为30s),通过mount命令解析挂载目录,从而定时检测共享文件存储挂载状态,当检测到挂载状态异常,由于Agent已经将挂载参数保存到配置文件内,可以根据配置文件内参数尝试重新挂载。其中,Linux系统支持重新挂载并且可以完成自动修复,Windows系统也可以完成重新映射。
在一些实施例中,响应于挂载状态异常,根据所述配置文件进行重新挂载,进一步包括:
判断所述云主机的地址与所述待挂载的文件存储的地址之间的心跳是否正常;
响应于所述云主机的地址与所述待挂载的文件存储的地址之间的心跳 恢复正常,根据所述配置文件进行重新挂载。
具体的,如果云本机地址与文件存储地址之间网络ping(packet internet groper,分组因特网包探测器)不通或心跳不正常,Agent则不会一直尝试挂载,直到心跳正常将会重新挂载。如果云主机重启之后,Agent也会自动开启,并自动挂载文件存储。
在一些实施例中,方法还包括:
所述代理服务响应于接收到所述管理平台下发的解除挂载的指令,修改所述配置文件并断开与所述文件存储的连接。
具体的,如图2所示,当管理平台上的管理员通过查看到attachments信息,可以选择某个云主机解除挂载,可以通过扩展Manila接口(os-share-deattach)实现,找到文件存储对应的云主机attment(attachment的简写)信息,记录卸载时间,并标记已删除。云主机内部Agent接收到卸载请求之后,修改配置文件,并且断开与底层文件存储的连接,Agent释放此文件存储的监控。
在一些实施例中,可以通过管理平台,创建文件存储,并使用带有Agent的镜像创建云主机,也可以创建完云主机之后手动安装Agent。可以提供基于Windows系统和Linux系统不同的Agent的安装包,同时可以对外提供统一的C++API。在Windows系统上面向服务编程,基于Windows Service(服务)可以实现轻量化应用,并嵌入windows系统自启动;在Linux系统上,将Agent注册为systemd(system daemon,系统守护进程)管理的service unit(服务单元),并实现开机服务自启动,嵌入到linux镜像内。Agent实现了对共享文件存储的定时监测(通过配置文件修改)、自动挂载、自动修复等功能。
本发明提出的方案可以实现直接将文件存储挂载给云主机,并且能够 自动获取文件存储的导出路径,通常一个文件存储的导出路径有多个,如果需要用户手动挂载的话,很难在各个导出路径间做到负载均衡。所以使用最少连接(Least Connections)算法,每次选择挂载次数最少的挂载点进行挂载,保证导出路径之间的负载均衡。云平台将挂载请求通过Manila REST API下发给Manila服务,记录挂载信息;然后调用Nova服务(novaclient,nova客服端)将请求转发给云主机内的Agent,Agent记录请求信息到配置文件,为了保证文件存储挂载状态的正常,Agent不仅仅只是执行挂载动作,还实现了定时检测机制,在本机与远端文件存储地址心跳正常的情况下,定时查询挂载状态,挂载状态异常,会尝试重新挂载并修复,保证文件存储的高可用性。如果本机与远端文件存储地址之间不通,则不会一直尝试挂载,直到心跳正常将会重新挂载。如果云主机重启之后,Agent也会自动开启,并自动挂载文件存储。挂载成功之后Manila服务将会保存挂载信息到数据库内,并且统计各个导出路径已连接的云主机个数,这样就能够满足负载均衡Least Connections算法的要求。卸载文件存储时,项目管理员可以直接选择对应的文件存储,就会展示所有已挂载的云主机,选择某个云主机卸载。卸载时,云主机内部Agent也会同步更改配置文件,不再监控此文件存储,并且云平台侧也会删除挂载信息。这样不用用户做任何操作,就能够方便地使用共享文件存储,并且也提升了管理平台上的项目管理员对文件存储的管理能力。
基于同一发明构思,根据本发明的另一个方面,本发明的实施例还提供了一种文件存储的管理系统400,如图4所示,包括:
发送模块401,所述发送模块401配置为利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;
记录模块402,所述记录模块402配置为将所述挂载参数记录到代理服务的配置文件中;
确定模块403,所述确定模块403配置为根据所述配置文件确定待挂载的文件存储的地址;
挂载模块404,所述挂载模块404配置为响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。
基于同一发明构思,根据本发明的另一个方面,如图5所示,本发明的实施例还提供了一种计算机设备501,包括:
至少一个处理器520;以及
存储器510,存储器510存储有可在处理器上运行的计算机程序511,处理器520执行程序时执行如上的任一种文件存储的管理方法的步骤。
基于同一发明构思,根据本发明的另一个方面,如图6所示,本发明的实施例还提供了一种计算机可读存储介质601,计算机可读存储介质601存储有计算机程序指令610,计算机程序指令610被处理器执行时执行如上的任一种文件存储的管理方法的步骤。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指示相关硬件来完成,程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。
此外,应该明白的是,本文的计算机可读存储介质(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种 功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本发明实施例公开的范围。
以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含 在本发明实施例的保护范围之内。

Claims (10)

  1. 一种文件存储的管理方法,其特征在于,包括以下步骤:
    利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;
    将所述挂载参数记录到代理服务的配置文件中;
    根据所述配置文件确定待挂载的文件存储的地址;
    响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。
  2. 如权利要求1所述的方法,其特征在于,利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数,进一步包括:
    接收所述管理平台基于最少连接算法返回的所述文件存储的导出路径。
  3. 如权利要求1所述的方法,其特征在于,还包括:
    响应于成功挂载所述文件系统,定时检测挂载状态;
    响应于挂载状态异常,根据所述配置文件进行重新挂载。
  4. 如权利要求3所述的方法,其特征在于,响应于挂载状态异常,根据所述配置文件进行重新挂载,进一步包括:
    判断所述云主机的地址与所述待挂载的文件存储的地址之间的心跳是否正常;
    响应于所述云主机的地址与所述待挂载的文件存储的地址之间的心跳恢复正常,根据所述配置文件进行重新挂载。
  5. 如权利要求1所述的方法,其特征在于,还包括:
    所述代理服务响应于接收到所述管理平台下发的解除挂载的指令,修改所述配置文件并断开与所述文件存储的连接。
  6. 如权利要求2所述的方法,其特征在于,还包括:
    所述管理平台将导出路径、挂载的云主机、挂载时间记录到表中。
  7. 如权利要求1所述的方法,其特征在于,利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数,进一步包括:
    所述管理平台响应于接收到所述挂载请求,利用Manila服务基于最少连接算法选择文件存储的导出路径,并将包含文件存储的导出路径的挂载参数记录到表中;
    所述Manila服务将所述导出路径转发到Nova服务;
    所述Nova服务将所述导出路径返回所述云主机上的所述代理服务。
  8. 一种文件存储的管理系统,其特征在于,包括:
    发送模块,所述发送模块配置为利用代理服务向管理平台发送挂载请求并接收所述管理平台返回的挂载参数;
    记录模块,所述记录模块配置为将所述挂载参数记录到代理服务的配置文件中;
    确定模块,所述确定模块配置为根据所述配置文件确定待挂载的文件存储的地址;
    挂载模块,所述挂载模块配置为响应于云主机的地址与所述待挂载的文件存储的地址之间的心跳正常,挂载文件系统。
  9. 一种计算机设备,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时执行如权利要求1-7任意一项所述的方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时执行如权利要求1-7任意一项所述的方法的步骤。
PCT/CN2021/096408 2020-08-14 2021-06-07 一种文件存储的管理方法、系统、设备以及介质 WO2022033120A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/020,812 US20230305996A1 (en) 2020-08-14 2021-06-07 File storage management method and system, device, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010821009.4 2020-08-14
CN202010821009.4A CN112003917B (zh) 2020-08-14 2020-08-14 一种文件存储的管理方法、系统、设备以及介质

Publications (1)

Publication Number Publication Date
WO2022033120A1 true WO2022033120A1 (zh) 2022-02-17

Family

ID=73473190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096408 WO2022033120A1 (zh) 2020-08-14 2021-06-07 一种文件存储的管理方法、系统、设备以及介质

Country Status (3)

Country Link
US (1) US20230305996A1 (zh)
CN (1) CN112003917B (zh)
WO (1) WO2022033120A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055310A (zh) * 2022-06-28 2023-05-02 荣耀终端有限公司 一种恢复用户配置信息的方法、装置及网络设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112003917B (zh) * 2020-08-14 2022-12-27 苏州浪潮智能科技有限公司 一种文件存储的管理方法、系统、设备以及介质
CN112506861A (zh) * 2020-12-17 2021-03-16 济南浪潮数据技术有限公司 文件存储挂载方法、装置、设备及计算机可读存储介质
CN113411225B (zh) * 2021-08-20 2021-11-09 苏州浪潮智能科技有限公司 基于云主机的qga服务管理方法、装置、设备及介质
CN114302085B (zh) * 2021-12-23 2024-02-20 云从科技集团股份有限公司 数据存储方法、装置、电子设备及存储介质
CN114443166B (zh) * 2022-01-25 2023-07-14 苏州浪潮智能科技有限公司 一种共享文件处理方法、装置及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601220B1 (en) * 2011-04-29 2013-12-03 Netapp, Inc. Transparent data migration in a storage system environment
CN106815298A (zh) * 2016-12-09 2017-06-09 中电科华云信息技术有限公司 基于块存储的分布式共享文件系统
CN110780973A (zh) * 2018-07-31 2020-02-11 中兴通讯股份有限公司 一种虚拟机迁移装置、方法、设备及可读存储介质
CN111124603A (zh) * 2019-11-30 2020-05-08 北京浪潮数据技术有限公司 一种cd-rom挂载方法、装置以及相关设备
CN112003917A (zh) * 2020-08-14 2020-11-27 苏州浪潮智能科技有限公司 一种文件存储的管理方法、系统、设备以及介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900606A (zh) * 2018-06-28 2018-11-27 郑州云海信息技术有限公司 一种跨系统实现数据共享的方法、装置及设备
CN110149409B (zh) * 2019-06-04 2023-08-15 平安科技(深圳)有限公司 云主机元数据服务管理方法、系统、设备及存储介质
CN110990369A (zh) * 2019-11-30 2020-04-10 苏州浪潮智能科技有限公司 一种集群部署文件系统的方法、设备以及存储介质
CN111143128B (zh) * 2019-12-24 2023-08-18 南京壹进制信息科技有限公司 一种openstack云主机数据保护方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601220B1 (en) * 2011-04-29 2013-12-03 Netapp, Inc. Transparent data migration in a storage system environment
CN106815298A (zh) * 2016-12-09 2017-06-09 中电科华云信息技术有限公司 基于块存储的分布式共享文件系统
CN110780973A (zh) * 2018-07-31 2020-02-11 中兴通讯股份有限公司 一种虚拟机迁移装置、方法、设备及可读存储介质
CN111124603A (zh) * 2019-11-30 2020-05-08 北京浪潮数据技术有限公司 一种cd-rom挂载方法、装置以及相关设备
CN112003917A (zh) * 2020-08-14 2020-11-27 苏州浪潮智能科技有限公司 一种文件存储的管理方法、系统、设备以及介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055310A (zh) * 2022-06-28 2023-05-02 荣耀终端有限公司 一种恢复用户配置信息的方法、装置及网络设备
CN116055310B (zh) * 2022-06-28 2023-10-20 荣耀终端有限公司 一种恢复用户配置信息的方法、装置及网络设备

Also Published As

Publication number Publication date
CN112003917B (zh) 2022-12-27
US20230305996A1 (en) 2023-09-28
CN112003917A (zh) 2020-11-27

Similar Documents

Publication Publication Date Title
WO2022033120A1 (zh) 一种文件存储的管理方法、系统、设备以及介质
US10963282B2 (en) Computing service with configurable virtualization control levels and accelerated launches
US10884787B1 (en) Execution guarantees in an on-demand network code execution system
US10140303B1 (en) Application aware snapshots
US20170344291A1 (en) Provisioning data volumes for containers running in virtual machines in which storage for the virtual machines are backed by heterogeneous storage devices
US8224782B2 (en) System and method for chunk based tiered storage volume migration
US9448899B2 (en) Method, apparatus and system for switching over virtual application two-node cluster in cloud environment
JP6074038B2 (ja) 共用記憶域上にある仮想ディスクのトランスペアレントなホスト側キャッシング
US20140215267A1 (en) Virtual machine placement with automatic deployment error recovery
US11249788B2 (en) Cloud management platform, and virtual machine management method and system
US20100100611A1 (en) Computer system and configuration management method therefor
US11363117B2 (en) Software-specific auto scaling
US11221866B2 (en) Accelerator loading method, system, and apparatus
WO2002088963A2 (en) Fabric device configuration interface
TWI764694B (zh) 容器化應用程式的管理系統與管理方法
WO2022037268A1 (zh) 一种容器管理方法、设备以及介质
US20150100960A1 (en) Method for resuming process and information processing system
US11675611B2 (en) Software service intervention in a computing system
CA3129984A1 (en) Method and system for accessing distributed block storage system in user mode
US20200326956A1 (en) Computing nodes performing automatic remote boot operations
CN110795278A (zh) 用于提供文件级恢复的系统和方法
WO2013078607A1 (zh) 一种业务包的安装方法和相关装置
US8838768B2 (en) Computer system and disk sharing method used thereby
CN109032753A (zh) 一种异构虚拟机硬盘托管方法、系统、存储介质及Nova平台
CN112988468A (zh) 虚拟化操作系统使用Ceph的方法和计算机可读存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21855176

Country of ref document: EP

Kind code of ref document: A1