WO2016197838A1 - 一种访问方法及装置 - Google Patents

一种访问方法及装置 Download PDF

Info

Publication number
WO2016197838A1
WO2016197838A1 PCT/CN2016/084224 CN2016084224W WO2016197838A1 WO 2016197838 A1 WO2016197838 A1 WO 2016197838A1 CN 2016084224 W CN2016084224 W CN 2016084224W WO 2016197838 A1 WO2016197838 A1 WO 2016197838A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
file system
folder
operating system
received
Prior art date
Application number
PCT/CN2016/084224
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 KR1020187000296A priority Critical patent/KR102256890B1/ko
Priority to JP2017564112A priority patent/JP6869193B2/ja
Priority to EP16806736.1A priority patent/EP3306897B1/en
Priority to SG11201709815TA priority patent/SG11201709815TA/en
Publication of WO2016197838A1 publication Critical patent/WO2016197838A1/zh
Priority to US15/813,389 priority patent/US11221997B2/en

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/18File system types
    • G06F16/188Virtual file systems
    • 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
    • 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
    • G06F16/162Delete operations
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to an access method and apparatus.
  • the terminal can create an NFS (Network File System) in a path in its own operating system, and then Mount the NAS device in NFS.
  • NFS Network File System
  • the operating system receives the access request to the NFS, it determines that the NAS device needs to be accessed, and sends the access request to the NFS, so that the NFS accesses the NAS device through the NFS service, so that the operating system of the terminal is The operating system accesses the NAS device in the same way as the operating system accesses the local storage device.
  • HDFS Hadoop Distributed File System
  • TFS TuBao File System
  • API Application Programming Interface
  • the present invention provides an access method and apparatus.
  • an access method comprising:
  • the virtual file system corresponding to the first storage device is created in a preset path in the operating system by using the user space file system FUSE in the operating system;
  • the method further includes:
  • the path of the network file system corresponding to the second storage device is mounted in the operating system, and is used as a preset path;
  • the step of creating a virtual file system corresponding to the first storage device in a preset path in the operating system by using the user space file system FUSE in the operating system is performed.
  • the method further includes:
  • the virtual file system corresponding to the first storage device created in the preset path is uninstalled
  • the method further includes:
  • the method further includes:
  • an access device comprising:
  • a first determining module configured to determine whether a first creation request for creating a virtual file system corresponding to the first storage device in the operating system is received
  • a creating module configured to create a virtual file system corresponding to the first storage device in a preset path in the operating system by using a user space file system FUSE in the operating system when receiving the first creation request ;
  • a second determining module configured to determine whether a first access request for the preset path is received
  • a first sending module configured to send the first access request to the virtual file system when the first access request for the preset path is received, so that the virtual file system is configured according to the first access Requesting access to the first storage device.
  • the device further includes:
  • a third determining module configured to determine whether a network file system corresponding to the second storage device is mounted in the operating system
  • a first obtaining module configured to: when a network file system corresponding to the second storage device is mounted in the operating system, acquire a path of the network file system corresponding to the second storage device in the operating system, and Preset path;
  • a first uninstalling module configured to uninstall the network file system corresponding to the second storage device mounted in the operating system
  • the creating module is further configured to perform the step of creating a virtual file system corresponding to the first storage device in a preset path in the operating system by using the user space file system FUSE in the operating system.
  • the device further includes:
  • a fourth determining module configured to determine whether a mount request for mounting a network file system corresponding to the second storage device in the preset path is received
  • a second unloading module configured to uninstall the virtual file system corresponding to the first storage device created in the preset path when receiving the mount request
  • a mounting module configured to mount a network file system corresponding to the second storage device in the preset path
  • a fifth determining module configured to determine whether a second access request for the preset path is received
  • a second sending module configured to send the second access when receiving a second access request for the preset path A request is made to the network file system to cause the network file system to access the second storage device according to the second access request.
  • the device further includes:
  • a sixth determining module configured to determine whether a second creation request for creating a folder to be created in the first storage device by using one subpath of the preset path is received; the second creation request carries The identifier of the folder to be created;
  • a third sending module configured to send the second creation request to the virtual file system when the second creation request is received, so that the virtual file system is configured according to the identifier of the folder to be created, Creating the folder to be created in the first storage device;
  • a module is configured to establish a correspondence between the one subpath and the identifier of the folder to be created.
  • the device further includes:
  • a seventh determining module configured to determine whether a deletion request for deleting a folder in the first storage device by using one subpath of the preset path is received
  • a second acquiring module configured to acquire a correspondence between the preset sub-path and the identifier of the folder when the deletion request is received;
  • a searching module configured to search, in the correspondence, an identifier of a folder corresponding to the one subpath
  • a fourth sending module configured to send an identifier of the folder corresponding to the one sub-path to the virtual file system, so that the virtual file system deletes the identifier of the folder in the first storage device Folder
  • And deleting a module configured to delete a correspondence between the one subpath and an identifier of the folder.
  • the technical solution provided by the embodiment of the present invention may include the following beneficial effects: in the present invention, determining whether a creation request for creating a virtual file system corresponding to the first storage device in the operating system is received; when the creation request is received Creating a virtual file system corresponding to the first storage device in the operating system by using the FUSE in the operating system; determining whether the first access request to the preset path is received; and receiving the first access request to the preset path And sending a first access request to the virtual file system, so that the virtual file system accesses the first storage device according to the first access request.
  • the access mode of the first storage device accessed by the operating system through the API interface provided by the first storage device is different from the access mode of the operating system to access the second storage device, and the technician has to write a large amount in the operating system in advance.
  • the application for accessing the first storage device through the API interface provided by the first storage device has a high labor cost.
  • the FUSE in the operating system is used to create a corresponding storage device in the operating system.
  • the virtual file system when accessing the first storage device, does not need to access the first storage device through the API interface provided by the first storage device, and the operating system only needs to send the first access request to the virtual file system, so that the virtual file system is An access request accesses the first storage device.
  • the operating system accesses the first storage device in the same manner as the operating system accesses the local storage device, because the operating system accesses the second storage device and accesses the local operating system.
  • the access mode of the storage device is the same. Therefore, the operating system accesses the first storage device in the same way as the operating system accesses the second storage device.
  • the operating system can successfully access the first storage device by using the application that originally accessed the second storage device, without the technician having to write a large number of API interfaces for accessing the first storage device in the operating system.
  • a storage device application reduces labor costs.
  • FIG. 1 is a flow chart showing an access method according to an exemplary embodiment.
  • FIG. 2 is a flow chart showing an access method according to an exemplary embodiment.
  • FIG. 3 is a flow chart showing an access method according to an exemplary embodiment.
  • FIG. 4 is a flowchart of an access method according to an exemplary embodiment.
  • FIG. 5 is a block diagram of an access device, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of an access method according to an exemplary embodiment. As shown in FIG. 1, the method includes the following steps.
  • step S101 it is determined whether a first creation request for creating a virtual file system corresponding to the first storage device in the operating system is received;
  • the first storage device may be an open source distributed file system such as HDFS or TFS.
  • the operating system can be an operating system such as linux.
  • the user when the user needs to access the first storage device, the user may input a first creation request for creating a virtual file system corresponding to the first storage device in the operating system, and submit the operation to the operation.
  • the system determines to perform step S102 when the operating system receives the first creation request.
  • step S102 is performed.
  • step S102 a virtual file system corresponding to the first storage device is created in a preset path in the operating system by using a FUSE (Filesystem in Userspace) in the operating system;
  • FUSE Filesystem in Userspace
  • the second storage device when the first creation request is received, it is determined whether the network file system corresponding to the second storage device is mounted in the operating system; the second storage device may be a NAS device; when the operating system is mounted When the network file system corresponding to the second storage device is configured, the path of the network file system corresponding to the second storage device is mounted in the operating system, and is used as a preset path; and the second storage device mounted in the operating system is uninstalled.
  • step S103 it is determined whether a first access request to the preset path is received
  • step S104 is performed.
  • the user may input an access instruction for accessing the preset path in the operating system and submit it to the operating system; when the operating system receives the access instruction, step S104 is performed.
  • step S104 the first access request is sent to the virtual file system.
  • the operating system accesses the first storage device in the same manner as the operating system accesses the local storage device.
  • the access mode of the first storage device accessed by the operating system through the API interface provided by the first storage device is different from the access mode of the operating system to access the second storage device, and the technician has to write a large amount in the operating system in advance.
  • the application for accessing the first storage device through the API interface provided by the first storage device has a high labor cost.
  • the virtual file system corresponding to the first storage device is created in the operating system by using the FUSE in the operating system.
  • the API interface provided by the first storage device is not required to be accessed.
  • the first storage device the operating system only needs to send the first access request to the virtual file system, so that the virtual file system accesses the first storage device according to the first access request.
  • the operating system accesses the first storage device in the same manner as the operating system accesses the local storage device, because the operating system accesses the second storage device and accesses the local operating system.
  • the access mode of the storage device is the same. Therefore, the operating system accesses the first storage device in the same way as the operating system accesses the second storage device.
  • the operating system can successfully access the first storage device by using the application that originally accessed the second storage device, without the technician having to write a large number of API interfaces for accessing the first storage device in the operating system.
  • a storage device application reduces labor costs.
  • the method further includes the following steps:
  • step S201 it is determined whether a mount request for mounting a network file system corresponding to the second storage device in the preset path is received;
  • the second storage device may be a NAS device.
  • the path of mounting the network file system in the operating system is the same as the path of creating the virtual file system in the operating system, but in the same path of the operating system, the network File systems and virtual file systems cannot exist at the same time.
  • the network file system corresponding to the second storage device when the first storage device needs to be accessed, if the network file system corresponding to the second storage device is already mounted in the preset path, the second storage device corresponding to the second storage device that is mounted in the preset path needs to be uninstalled.
  • Network file The system then creates a virtual file system corresponding to the first storage device in the preset path, so that the first storage device can be accessed.
  • the second storage device needs to be accessed, if the virtual file system corresponding to the first storage device is created in the preset path, the virtual file system corresponding to the first storage device created in the preset path needs to be uninstalled. Then, the network file system corresponding to the second storage device is mounted in the preset path, so that the second storage device can be accessed.
  • the virtual file system corresponding to the first storage device has been created in the preset path in the operating system. If the user wants to access the second storage device, it needs to be mounted in the preset path of the operating system. a network file system corresponding to the second storage device, the user may input a mount request for mounting a network file system corresponding to the second storage device in a preset path of the operating system in the operating system, and submit the request to the operating system; When the operating system receives the mount request, it is determined to perform step S202.
  • step S202 the virtual file system corresponding to the first storage device created in the preset path is uninstalled;
  • the virtual file system corresponding to the first storage device is created in the preset path in the operating system, because the FUSE in the operating system is used in step S102; therefore, in this step, the process of the FUSE can be closed.
  • the virtual file system corresponding to the first storage device created in the preset path is uninstalled.
  • step S203 the network file system corresponding to the second storage device is mounted in the preset path
  • the NFS corresponding to the NAS device can be mounted in the preset path.
  • step S204 it is determined whether a second access request for the preset path is received
  • step S205 After the operating system mounts the network file system corresponding to the second storage device in the preset path, if the user needs to access the second storage device, the user may input an access request for accessing the preset path in the operating system, and Submitted to the operating system; when the operating system receives the access request, it is determined to perform step S205.
  • the user may input an access instruction for accessing the preset path in the operating system and submit it to the operating system; when the operating system receives the access instruction, it is determined to perform step S205.
  • step S205 the second access request is sent to the network file system.
  • the method further includes the following steps:
  • step S301 it is determined whether a creation request for creating a folder to be created in the first storage device by using one sub path of the preset path is received;
  • the creation request carries the identifier of the folder to be created.
  • a folder needs to be created in the first storage device, and then the file content is stored in the created folder. Therefore, when the user needs to create a folder in the first storage device by using a sub path of the preset path, a sub-path for the preset path may be input in the operating system to create a to-be-created device in the first storage device.
  • the creation request of the folder and carrying the identifier of the folder to be created is submitted to the operating system; the operating system receives the creation request, and step S302 is performed.
  • the identifier of the folder may be the name or the number of the folder, and the comparison of the present invention is not limited.
  • step S302 the creation request is sent to the virtual file system
  • the virtual file system receives the creation request, extracts the identifier of the folder to be created from the creation request, and creates a folder to be created in the first storage device according to the identifier of the folder to be created; For the operating system, the operating system creates the folder in the first storage device in the same way that the operating system creates the folder in the local storage device. Then, a notification message for notifying that the folder to be created is created in the first storage device is sent to the operating system; the operating system receives the notification message, and step S303 is performed.
  • step S303 a correspondence between the one subpath and the identifier of the folder to be created is established.
  • the correspondence between the preset sub-path and the identifier of the folder is obtained, and the identifier of the one sub-path and the folder to be created is taken as a record, and is stored between the preset sub-path and the identifier of the folder.
  • the correspondence between the establishment of the one sub-path and the identifier of the folder to be created is implemented.
  • the mapping between the preset sub-path and the identifier of the folder may be stored in a shared device, so that other operating systems may obtain the correspondence between the preset sub-path and the identifier of the folder from the shared device. relationship.
  • the method further includes the following steps:
  • step S401 it is determined whether a deletion request for deleting a folder in the first storage device by using a sub path of the preset path is received;
  • the deletion instruction for deleting the folder on the first storage device by using a sub path of the preset path is input in the operating system, and is submitted to the operating system; the operating system receives the deletion instruction, and step S402 is performed.
  • step S402 a correspondence between the preset sub-path and the identifier of the folder is acquired;
  • the identifier of the folder may be the name or the number of the folder, and the comparison of the present invention is not limited.
  • step S403 searching for an identifier of a folder corresponding to the one subpath in the foregoing correspondence relationship
  • the record including the one subpath is obtained in the foregoing correspondence, and the identifier of the folder in the record is obtained.
  • step S404 the identifier of the folder corresponding to the one subpath is sent to the virtual file system
  • the virtual file system receives the identifier of the folder, and deletes the folder corresponding to the identifier of the folder in the first storage device; thus, for the operating system, the operating system deletes the folder in the first storage device.
  • the deletion method is the same as the way the operating system deletes the folder in the local storage device. Then, a notification message for notifying that the folder corresponding to the identifier of the folder is deleted in the first storage device is sent to the operating system; the operating system receives the notification message, and step S405 is performed.
  • step S405 the correspondence between the identifier of the one subpath and the folder is deleted.
  • the record including the identifier of the folder is deleted in the correspondence between the preset sub-path and the identifier of the folder, so as to delete the correspondence between the identifier of the one sub-path and the identifier of the folder.
  • FIG. 5 is a block diagram of an access device, according to an exemplary embodiment.
  • the apparatus includes:
  • the first determining module 11 is configured to determine whether a first creation request for creating a virtual file system corresponding to the first storage device in the operating system is received;
  • a creating module 12 configured to create a virtual file corresponding to the first storage device in a preset path in the operating system by using a user space file system FUSE in the operating system when receiving the first creation request system;
  • the second determining module 13 is configured to determine whether a first access request for the preset path is received
  • the first sending module 14 is configured to: when receiving the first access request to the preset path, send the first access request to the virtual file system, so that the virtual file system is according to the first An access request accesses the first storage device.
  • a first storage device is created for creating in the operating system.
  • the virtual file system is created in the operating system, and the virtual file system corresponding to the first storage device is created in the operating system by using FUSE in the operating system; determining whether the first path to the preset path is received.
  • the access request is sent to the virtual file system when the first access request for the preset path is received, so that the virtual file system accesses the first storage device according to the first access request.
  • the access mode of the first storage device accessed by the operating system through the API interface provided by the first storage device is different from the access mode of the operating system to access the second storage device, and the technician has to write a large amount in the operating system in advance.
  • the application for accessing the first storage device through the API interface provided by the first storage device has a high labor cost.
  • the virtual file system corresponding to the first storage device is created in the operating system by using the FUSE in the operating system.
  • the API interface provided by the first storage device is not required to be accessed.
  • the first storage device the operating system only needs to send the first access request to the virtual file system, so that the virtual file system accesses the first storage device according to the first access request.
  • the operating system accesses the first storage device in the same manner as the operating system accesses the local storage device, because the operating system accesses the second storage device and accesses the local operating system.
  • the access mode of the storage device is the same. Therefore, the operating system accesses the first storage device in the same way as the operating system accesses the second storage device.
  • the operating system can successfully access the first storage device by using the application that originally accessed the second storage device, without the technician having to write a large number of API interfaces for accessing the first storage device in the operating system.
  • a storage device application reduces labor costs.
  • the device further includes:
  • a third determining module configured to determine whether a network file system corresponding to the second storage device is mounted in the operating system
  • a first obtaining module configured to: when a network file system corresponding to the second storage device is mounted in the operating system, acquire a path of the network file system corresponding to the second storage device in the operating system, and Preset path;
  • a first uninstalling module configured to uninstall the network file system corresponding to the second storage device mounted in the operating system
  • the creating module is further configured to perform the step of creating a virtual file system corresponding to the first storage device in a preset path in the operating system by using the user space file system FUSE in the operating system.
  • the device further includes:
  • a fourth determining module configured to determine whether a second storage device is configured to be mounted in the preset path Mount request for the network file system
  • a second unloading module configured to uninstall the virtual file system corresponding to the first storage device created in the preset path when receiving the mount request
  • a mounting module configured to mount a network file system corresponding to the second storage device in the preset path
  • a fifth determining module configured to determine whether a second access request for the preset path is received
  • a second sending module configured to send the second access request to the network file system when the second access request for the preset path is received, so that the network file system is configured according to the second access Requesting access to the second storage device.
  • the device further includes:
  • a sixth determining module configured to determine whether a second creation request for creating a folder to be created in the first storage device by using one subpath of the preset path is received; the second creation request carries The identifier of the folder to be created;
  • a third sending module configured to send the second creation request to the virtual file system when the second creation request is received, so that the virtual file system is configured according to the identifier of the folder to be created, Creating the folder to be created in the first storage device;
  • a module is configured to establish a correspondence between the one subpath and the identifier of the folder to be created.
  • the device further includes:
  • a seventh determining module configured to determine whether a deletion request for deleting a folder in the first storage device by using one subpath of the preset path is received
  • a second acquiring module configured to acquire a correspondence between the preset sub-path and the identifier of the folder when the deletion request is received;
  • a searching module configured to search, in the correspondence, an identifier of a folder corresponding to the one subpath
  • a fourth sending module configured to send an identifier of the folder corresponding to the one sub-path to the virtual file system, so that the virtual file system deletes the identifier of the folder in the first storage device Folder
  • And deleting a module configured to delete a correspondence between the one subpath and an identifier of the folder.

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)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明是关于一种访问方法及装置,包括:判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;当接收到第一创建请求时,利用操作系统中的FUSE,在操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;判断是否接收到对预设路径的第一访问请求;当接收到对预设路径的第一访问请求时,发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。操作系统使用原先访问第第二存储设备的应用程序就可以成功访问第一存储设备,无需使技术人员事先在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,降低了人工成本。

Description

一种访问方法及装置
本申请要求2015年6月8日递交的申请号为201510309492.7、发明名称为“一种访问方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,尤其涉及一种访问方法及装置。
背景技术
当前,大多数企业都利用NAS(Network Attached Storage,网络附属存储)设备存储数据,终端可以在自身的操作系统中的某一路径中创建一个NFS(Network File System,网络文件系统),然后在该NFS中挂载NAS设备。当操作系统接收到对该NFS的访问请求时,即确定需要访问NAS设备,发送该访问请求给该NFS,以使该NFS通过NFS服务访问NAS设备,这样对于终端的操作系统来讲,就使得操作系统访问NAS设备的访问方式与操作系统访问终端本地的存储设备的访问方式相同。
然而,随着科技的发展,企业需要存储的数据的数据量与日俱增,由于配置一个NAS设备的成本很高,当数据量增加时,需要同时配置多个NAS设备才能满足存储需求,但是这样就会大大增加企业的运营成本。
因此,为了降低运营成本,越来越多的企业开始使用HDFS(Hadoop Distributed File System,分布式文件系统)或TFS(TaoBao File System,淘宝文件系统)等开源的分布式文件系统替代NAS设备来存储数据。但是,当操作系统需要访问开源的分布式文件系统,操作系统必须通过开源的分布式文件系统提供的API(Application Programming Interface,应用程序编程接口)才能实现对开源的分布式文件系统的访问。
发明内容
为克服相关技术中存在的问题,本发明提供一种访问方法及装置。
根据本发明实施例的第一方面,提供一种访问方法,所述方法包括:
判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;
当接收到所述第一创建请求时,利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;
判断是否接收到对所述预设路径的第一访问请求;
当接收到对所述预设路径的第一访问请求时,发送所述第一访问请求给所述虚拟文件系统,以使所述虚拟文件系统根据所述第一访问请求访问所述第一存储设备。
进一步地,所述方法还包括:
判断所述操作系统中是否挂载有第二存储设备对应的网络文件系统;
当所述操作系统中挂载有第二存储设备对应的网络文件系统时,获取在所述操作系统中挂载第二存储设备对应的网络文件系统的路径,并作为预设路径;
卸载在所述操作系统中挂载的所述第二存储设备对应的所述网络文件系统;
执行所述利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统的步骤。
进一步地,所述方法还包括:
判断是否接收到用于在所述预设路径中挂载第二存储设备对应的网络文件系统的挂载请求;
当接收到所述挂载请求时,卸载在所述预设路径中创建的第一存储设备对应的虚拟文件系统;
在所述预设路径中挂载第二存储设备对应的网络文件系统;
判断是否接收到对所述预设路径的第二访问请求;
当接收到对所述预设路径的第二访问请求时,发送所述第二访问请求给所述网络文件系统,以使所述网络文件系统根据所述第二访问请求访问所述第二存储设备。
进一步地,所述方法还包括:
判断是否接收到用于通过所述预设路径的一个子路径在所述第一存储设备中创建待创建的文件夹的第二创建请求;所述第二创建请求携带所述待创建的文件夹的标识;
当接收到所述第二创建请求时,发送所述第二创建请求给所述虚拟文件系统;以使所述虚拟文件系统根据所述待创建的文件夹的标识,在所述第一存储设备中创建所述待创建的文件夹;
建立所述一个子路径与所述待创建的文件夹的标识之间的对应关系。
进一步地,所述方法还包括:
判断是否接收到用于通过所述预设路径的一个子路径在第一存储设备中删除文件夹的删除请求;
当接收到所述删除请求时,获取预设子路径与文件夹的标识之间的对应关系;
在所述对应关系中查找所述一个子路径对应的文件夹的标识;
将所述一个子路径对应的文件夹的标识发送给所述虚拟文件系统;以使所述虚拟文件系统在所述第一存储设备中删除所述文件夹的标识对应的文件夹;
删除所述一个子路径与所述文件夹的标识之间的对应关系。
根据本发明实施例的第二方面,提供一种访问装置,所述装置包括:
第一判断模块,用于判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;
创建模块,用于当接收到所述第一创建请求时,利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;
第二判断模块,用于判断是否接收到对所述预设路径的第一访问请求;
第一发送模块,用于当接收到对所述预设路径的第一访问请求时,发送所述第一访问请求给所述虚拟文件系统,以使所述虚拟文件系统根据所述第一访问请求访问所述第一存储设备。
进一步地,所述装置还包括:
第三判断模块,用于判断所述操作系统中是否挂载有第二存储设备对应的网络文件系统;
第一获取模块,用于当所述操作系统中挂载有第二存储设备对应的网络文件系统时,获取在所述操作系统中挂载第二存储设备对应的网络文件系统的路径,并作为预设路径;
第一卸载模块,用于卸载在所述操作系统中挂载的所述第二存储设备对应的所述网络文件系统;
所述创建模块还用于执行所述利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统的步骤。
进一步地,所述装置还包括:
第四判断模块,用于判断是否接收到用于在所述预设路径中挂载第二存储设备对应的网络文件系统的挂载请求;
第二卸载模块,用于当接收到所述挂载请求时,卸载在所述预设路径中创建的第一存储设备对应的虚拟文件系统;
挂载模块,用于在所述预设路径中挂载第二存储设备对应的网络文件系统;
第五判断模块,用于判断是否接收到对所述预设路径的第二访问请求;
第二发送模块,用于当接收到对所述预设路径的第二访问请求时,发送所述第二访 问请求给所述网络文件系统,以使所述网络文件系统根据所述第二访问请求访问所述第二存储设备。
进一步地,所述装置还包括:
第六判断模块,用于判断是否接收到用于通过所述预设路径的一个子路径在所述第一存储设备中创建待创建的文件夹的第二创建请求;所述第二创建请求携带所述待创建的文件夹的标识;
第三发送模块,用于当接收到所述第二创建请求时,发送所述第二创建请求给所述虚拟文件系统;以使所述虚拟文件系统根据所述待创建的文件夹的标识,在所述第一存储设备中创建所述待创建的文件夹;
建立模块,用于建立所述一个子路径与所述待创建的文件夹的标识之间的对应关系。
进一步地,所述装置还包括:
第七判断模块,用于判断是否接收到用于通过所述预设路径的一个子路径在第一存储设备中删除文件夹的删除请求;
第二获取模块,用于当接收到所述删除请求时,获取预设子路径与文件夹的标识之间的对应关系;
查找模块,用于在所述对应关系中查找所述一个子路径对应的文件夹的标识;
第四发送模块,用于将所述一个子路径对应的文件夹的标识发送给所述虚拟文件系统;以使所述虚拟文件系统在所述第一存储设备中删除所述文件夹的标识对应的文件夹;
删除模块,用于删除所述一个子路径与所述文件夹的标识之间的对应关系。
本发明的实施例提供的技术方案可以包括以下有益效果:在本发明中,判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的创建请求;当接收到创建请求时,利用操作系统中的FUSE,在操作系统中创建第一存储设备对应的虚拟文件系统;判断是否接收到对预设路径的第一访问请求;当接收到对预设路径的第一访问请求时,发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。
在现有技术中,操作系统通过第一存储设备提供的API接口访问第一存储设备的访问方式与操作系统访问第二存储设备的访问方式是不同的,技术人员事先要在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,人工成本较高。
而在本发明中,利用操作系统中的FUSE,在操作系统中创建第一存储设备对应的 虚拟文件系统,当要访问第一存储设备时,无需通过第一存储设备提供的API接口访问第一存储设备,操作系统只需发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。这样,对于操作系统来讲,就使得操作系统访问第一存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同,由于操作系统访问第二存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同,因此,操作系统访问第一存储设备的访问方式与操作系统访问第二存储设备的访问方式相同。
因此,操作系统使用原先访问第第二存储设备的应用程序就可以成功访问第一存储设备,无需使技术人员事先在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,降低了人工成本。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
图1是根据一示例性实施例示出的一种访问方法的流程图。
图2是根据一示例性实施例示出的一种访问方法的流程图。
图3是根据一示例性实施例示出的一种访问方法的流程图。
图4是根据一示例性实施例示出的一种访问方法的流程图。
图5是根据一示例性实施例示出的一种访问装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种访问方法的流程图,如图1所示,该方法包括以下步骤。
在步骤S101中,判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;
其中,第一存储设备可以为HDFS或TFS等开源的分布式文件系统。操作系统可以为linux等操作系统。
在本发明实施例中,当用户需要访问第一存储设备时,用户可以在操作系统中输入用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求,并提交给操作系统;当操作系统接收到第一创建请求时,确定执行步骤S102。
例如,用户在操作系统中输入用于在操作系统中创建第一存储设备对应的虚拟文件系统的创建指令,并提交给操作系统,当操作系统接收到该创建指令时,执行步骤S102。
当接收到该创建请求时,在步骤S102中,利用操作系统中的FUSE(Filesystem in Userspace,用户空间文件系统)在操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;
在本发明实施例中,当接收到第一创建请求时,判断操作系统中是否挂载有第二存储设备对应的网络文件系统;第二存储设备可以为NAS设备;当操作系统中挂载有第二存储设备对应的网络文件系统时,获取在操作系统中挂载第二存储设备对应的网络文件系统的路径,并作为预设路径;卸载在操作系统中挂载的第二存储设备对应的网络文件系统;然后利用操作系统中的FUSE,在操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;当操作系统中未挂载第二存储设备对应的网络文件系统时,将操作系统中的任一个未被占用的路径作为预设路径;然后利用操作系统中的FUSE,在操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统。
在步骤S103中,判断是否接收到对预设路径的第一访问请求;
当操作系统在预设路径中创建完第一存储设备对应的虚拟文件系统后,如果用户需要访问第一存储设备,用户可以在操作系统中输入用于访问预设路径中的访问请求,并提交给操作系统;当操作系统接收到该访问请求时,执行步骤S104。
例如,当用户需要访问第一存储设备时,用户可以在操作系统中输入用于访问预设路径的访问指令,并提交给操作系统;当操作系统接收到该访问指令时,执行步骤S104。
当接收到对预设路径的第一访问请求时,在步骤S104中,发送第一访问请求给虚拟文件系统。
如此使得虚拟文件系统根据该访问请求访问第一存储设备。
这样,对于操作系统来讲,就使得操作系统访问第一存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同。
在本发明图1所示的实施例中,判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的创建请求;当接收到创建请求时,利用操作系统中的FUSE,在操作系统中创建第一存储设备对应的虚拟文件系统;判断是否接收到对预设路径的第一访问请求;当接收到对预设路径的第一访问请求时,发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。
在现有技术中,操作系统通过第一存储设备提供的API接口访问第一存储设备的访问方式与操作系统访问第二存储设备的访问方式是不同的,技术人员事先要在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,人工成本较高。
而在本发明实施例中,利用操作系统中的FUSE,在操作系统中创建第一存储设备对应的虚拟文件系统,当要访问第一存储设备时,无需通过第一存储设备提供的API接口访问第一存储设备,操作系统只需发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。这样,对于操作系统来讲,就使得操作系统访问第一存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同,由于操作系统访问第二存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同,因此,操作系统访问第一存储设备的访问方式与操作系统访问第二存储设备的访问方式相同。
这样,操作系统使用原先访问第第二存储设备的应用程序就可以成功访问第一存储设备,无需使技术人员事先在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,降低了人工成本。
在本发明另一实施例中,参见图2,该方法还包括以下步骤:
在步骤S201中,判断是否接收到用于在预设路径中挂载第二存储设备对应的网络文件系统的挂载请求;
其中,第二存储设备可以为NAS设备。
在本发明实施例中,为了避免浪费操作系统的路径,在操作系统中挂载网络文件系统的路径与在操作系统中创建虚拟文件系统的路径相同,但是,在操作系统的同一路径中,网络文件系统和虚拟文件系统是无法同时存在的。
因此,当需要访问第一存储设备时,如果此时预设路径中已经挂载了第二存储设备对应的网络文件系统,则需要卸载在预设路径中挂载的、第二存储设备对应的网络文件 系统,然后在预设路径中创建第一存储设备对应的虚拟文件系统,如此才可以访问第一存储设备。以及,当需要访问第二存储设备时,如果此时预设路径中创建了第一存储设备对应的虚拟文件系统,则需要卸载在预设路径中创建的、第一存储设备对应的虚拟文件系统,然后在预设路径中挂载第二存储设备对应的网络文件系统,如此才可以访问第二存储设备。
在本发明实施例中,在操作系统中的预设路径中已经创建了第一存储设备对应的虚拟文件系统,如果用户要访问第二存储设备,就需要在操作系统的预设路径中挂载第二存储设备对应的网络文件系统,用户可以在操作系统中输入用于在操作系统的预设路径中挂载第二存储设备对应的网络文件系统的挂载请求,并提交给操作系统;当操作系统接收到该挂载请求时,确定执行步骤S202。
当接收到该挂载请求时,在步骤S202中,卸载在预设路径中创建的第一存储设备对应的虚拟文件系统;
其中,由于在步骤S102中是利用操作系统中的FUSE,在操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;因此,在本步骤中,可以关闭FUSE的进程,如此实现卸载在预设路径中创建的、第一存储设备对应的虚拟文件系统。
在步骤S203中,在预设路径中挂载第二存储设备对应的网络文件系统;
例如,可以在预设路径中挂载NAS设备对应的NFS。
在步骤S204中,判断是否接收到对预设路径的第二访问请求;
当操作系统在预设路径中挂载完第二存储设备对应的网络文件系统后,如果用户需要访问第二存储设备,用户可以在操作系统中输入用于在访问预设路径的访问请求,并提交给操作系统;当操作系统接收到该访问请求时,确定执行步骤S205。
例如,当用户需要访问第二存储设备时,用户可以在操作系统中输入用于访问预设路径的访问指令,并提交给操作系统;当操作系统接收到该访问指令时,确定执行步骤S205。
当接收到对预设路径的第二访问请求时,在步骤S205中,发送第二访问请求给网络文件系统。
如此使得网络文件系统根据第二访问请求访问第二存储设备。
在本发明又一实施例中,参见图3,该方法还包括以下步骤:
在步骤S301中,判断是否接收到用于通过预设路径的一个子路径在第一存储设备中创建待创建的文件夹的创建请求;
其中,创建请求携带待创建的文件夹的标识。
其中,当用户需要在第一存储设备中存储文件内容时,首先需要在第一存储设备中创建文件夹,然后在创建的文件夹中存储文件内容。因此,当用户需要通过预设路径的一个子路径在第一存储设备中创建一个文件夹时,可以在操作系统中输入用于通过预设路径的一个子路径在第一存储设备中创建待创建的文件夹的、且携带待创建的文件夹的标识的创建请求,并提交给操作系统;操作系统接收该创建请求,执行步骤S302。
其中,文件夹的标识可以为文件夹的名称或编号等,本发明对比不加以限定。
当接收到该创建请求时,在步骤S302中,发送该创建请求给虚拟文件系统;
以使虚拟文件系统根据待创建的文件夹的标识,在第一存储设备中创建待创建的文件夹。
其中,虚拟文件系统接收该创建请求,从该创建请求中提取出待创建的文件夹的标识,再根据待创建的文件夹的标识,在第一存储设备中创建待创建的文件夹;这样,对于操作系统来讲,就使得操作系统在第一存储设备中创建文件夹的方式与操作系统在本地的存储设备中创建文件夹的创建方式相同。然后发送用于通知已完成在第一存储设备中创建待创建的文件夹的通知消息给操作系统;操作系统接收该通知消息,执行步骤S303。
在步骤S303中,建立该一个子路径与待创建的文件夹的标识之间的对应关系。
具体地,获取预设子路径与文件夹的标识之间的对应关系,将该一个子路径和待创建的文件夹的标识作为一条记录,并存储在预设子路径与文件夹的标识之间的对应关系中,以实现建立该一个子路径与待创建的文件夹的标识之间的对应关系。
其中,预设子路径与文件夹的标识之间的对应关系可以存储在一个共享设备中,这样,其他操作系统也可以从该共享设备中获取预设子路径与文件夹的标识之间的对应关系。
在本发明又一实施例中,参见图4,该方法还包括以下步骤:
在步骤S401中,判断是否接收到用于通过预设路径的一个子路径在第一存储设备中删除文件夹的删除请求;
其中,当用户需要通过预设路径的一个子路径删除第一存储设备中的文件夹时,可 以在操作系统中输入用于通过预设路径的一个子路径删除第一存储设备上的文件夹的删除指令,并提交给操作系统;操作系统接收该删除指令,执行步骤S402。
当接收到该删除请求时,在步骤S402中,获取预设子路径与文件夹的标识之间的对应关系;
其中,文件夹的标识可以为文件夹的名称或编号等,本发明对比不加以限定。
在步骤S403中,在上述对应关系中查找该一个子路径对应的文件夹的标识;
其中,在上述对应关系中获取包括该一个子路径的记录,获取该记录中的文件夹的标识。
在步骤S404中,将该一个子路径对应的文件夹的标识发送给虚拟文件系统;
以使虚拟文件系统在第一存储设备中删除该文件夹的标识对应的文件夹。
其中,虚拟文件系统接收该文件夹的标识,在第一存储设备中删除该文件夹的标识对应的文件夹;这样,对于操作系统来讲,就使得操作系统在第一存储设备中删除文件夹的删除方式与操作系统在本地的存储设备中删除文件夹的删除方式相同。然后发送用于通知已完成在第一存储设备中删除该文件夹的标识对应的文件夹的通知消息给操作系统;操作系统接收该通知消息,执行步骤S405。
在步骤S405中,删除该一个子路径与文件夹的标识之间的对应关系。
具体地,在预设子路径与文件夹的标识之间的对应关系中删除包括该文件夹的标识的记录,以实现删除该一个子路径与文件夹的标识之间的对应关系。
图5是根据一示例性实施例示出的一种访问装置的框图。参照图5,该装置包括:
第一判断模块11,用于判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;
创建模块12,用于当接收到所述第一创建请求时,利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;
第二判断模块13,用于判断是否接收到对所述预设路径的第一访问请求;
第一发送模块14,用于当接收到对所述预设路径的第一访问请求时,发送所述第一访问请求给所述虚拟文件系统,以使所述虚拟文件系统根据所述第一访问请求访问所述第一存储设备。
在本发明图5所示的实施例中,判断是否接收到用于在操作系统中创建第一存储设 备对应的虚拟文件系统的创建请求;当接收到创建请求时,利用操作系统中的FUSE,在操作系统中创建第一存储设备对应的虚拟文件系统;判断是否接收到对预设路径的第一访问请求;当接收到对预设路径的第一访问请求时,发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。
在现有技术中,操作系统通过第一存储设备提供的API接口访问第一存储设备的访问方式与操作系统访问第二存储设备的访问方式是不同的,技术人员事先要在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,人工成本较高。
而在本发明实施例中,利用操作系统中的FUSE,在操作系统中创建第一存储设备对应的虚拟文件系统,当要访问第一存储设备时,无需通过第一存储设备提供的API接口访问第一存储设备,操作系统只需发送第一访问请求给虚拟文件系统,以使虚拟文件系统根据第一访问请求访问第一存储设备。这样,对于操作系统来讲,就使得操作系统访问第一存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同,由于操作系统访问第二存储设备的访问方式与操作系统访问本地的存储设备的访问方式相同,因此,操作系统访问第一存储设备的访问方式与操作系统访问第二存储设备的访问方式相同。
因此,操作系统使用原先访问第第二存储设备的应用程序就可以成功访问第一存储设备,无需使技术人员事先在操作系统中编写大量的、用于通过第一存储设备提供的API接口访问第一存储设备的应用程序,降低了人工成本。
进一步地,所述装置还包括:
第三判断模块,用于判断所述操作系统中是否挂载有第二存储设备对应的网络文件系统;
第一获取模块,用于当所述操作系统中挂载有第二存储设备对应的网络文件系统时,获取在所述操作系统中挂载第二存储设备对应的网络文件系统的路径,并作为预设路径;
第一卸载模块,用于卸载在所述操作系统中挂载的所述第二存储设备对应的所述网络文件系统;
所述创建模块还用于执行所述利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统的步骤。
进一步地,所述装置还包括:
第四判断模块,用于判断是否接收到用于在所述预设路径中挂载第二存储设备对应 的网络文件系统的挂载请求;
第二卸载模块,用于当接收到所述挂载请求时,卸载在所述预设路径中创建的第一存储设备对应的虚拟文件系统;
挂载模块,用于在所述预设路径中挂载第二存储设备对应的网络文件系统;
第五判断模块,用于判断是否接收到对所述预设路径的第二访问请求;
第二发送模块,用于当接收到对所述预设路径的第二访问请求时,发送所述第二访问请求给所述网络文件系统,以使所述网络文件系统根据所述第二访问请求访问所述第二存储设备。
进一步地,所述装置还包括:
第六判断模块,用于判断是否接收到用于通过所述预设路径的一个子路径在所述第一存储设备中创建待创建的文件夹的第二创建请求;所述第二创建请求携带所述待创建的文件夹的标识;
第三发送模块,用于当接收到所述第二创建请求时,发送所述第二创建请求给所述虚拟文件系统;以使所述虚拟文件系统根据所述待创建的文件夹的标识,在所述第一存储设备中创建所述待创建的文件夹;
建立模块,用于建立所述一个子路径与所述待创建的文件夹的标识之间的对应关系。
进一步地,所述装置还包括:
第七判断模块,用于判断是否接收到用于通过所述预设路径的一个子路径在第一存储设备中删除文件夹的删除请求;
第二获取模块,用于当接收到所述删除请求时,获取预设子路径与文件夹的标识之间的对应关系;
查找模块,用于在所述对应关系中查找所述一个子路径对应的文件夹的标识;
第四发送模块,用于将所述一个子路径对应的文件夹的标识发送给所述虚拟文件系统;以使所述虚拟文件系统在所述第一存储设备中删除所述文件夹的标识对应的文件夹;
删除模块,用于删除所述一个子路径与所述文件夹的标识之间的对应关系。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途 或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (10)

  1. 一种访问方法,其特征在于,所述方法包括:
    判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;
    当接收到所述第一创建请求时,利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;
    判断是否接收到对所述预设路径的第一访问请求;
    当接收到对所述预设路径的第一访问请求时,发送所述第一访问请求给所述虚拟文件系统,以使所述虚拟文件系统根据所述第一访问请求访问所述第一存储设备。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    判断所述操作系统中是否挂载有第二存储设备对应的网络文件系统;
    当所述操作系统中挂载有第二存储设备对应的网络文件系统时,获取在所述操作系统中挂载第二存储设备对应的网络文件系统的路径,并作为预设路径;
    卸载在所述操作系统中挂载的所述第二存储设备对应的所述网络文件系统;
    执行所述利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统的步骤。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    判断是否接收到用于在所述预设路径中挂载第二存储设备对应的网络文件系统的挂载请求;
    当接收到所述挂载请求时,卸载在所述预设路径中创建的第一存储设备对应的虚拟文件系统;
    在所述预设路径中挂载第二存储设备对应的网络文件系统;
    判断是否接收到对所述预设路径的第二访问请求;
    当接收到对所述预设路径的第二访问请求时,发送所述第二访问请求给所述网络文件系统,以使所述网络文件系统根据所述第二访问请求访问所述第二存储设备。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    判断是否接收到用于通过所述预设路径的一个子路径在所述第一存储设备中创建待创建的文件夹的第二创建请求;所述第二创建请求携带所述待创建的文件夹的标识;
    当接收到所述第二创建请求时,发送所述第二创建请求给所述虚拟文件系统;以使所述虚拟文件系统根据所述待创建的文件夹的标识,在所述第一存储设备中创建所述待创建的文件夹;
    建立所述一个子路径与所述待创建的文件夹的标识之间的对应关系。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    判断是否接收到用于通过所述预设路径的一个子路径在第一存储设备中删除文件夹的删除请求;
    当接收到所述删除请求时,获取预设子路径与文件夹的标识之间的对应关系;
    在所述对应关系中查找所述一个子路径对应的文件夹的标识;
    将所述一个子路径对应的文件夹的标识发送给所述虚拟文件系统;以使所述虚拟文件系统在所述第一存储设备中删除所述文件夹的标识对应的文件夹;
    删除所述一个子路径与所述文件夹的标识之间的对应关系。
  6. 一种访问装置,其特征在于,所述装置包括:
    第一判断模块,用于判断是否接收到用于在操作系统中创建第一存储设备对应的虚拟文件系统的第一创建请求;
    创建模块,用于当接收到所述第一创建请求时,利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统;
    第二判断模块,用于判断是否接收到对所述预设路径的第一访问请求;
    第一发送模块,用于当接收到对所述预设路径的第一访问请求时,发送所述第一访问请求给所述虚拟文件系统,以使所述虚拟文件系统根据所述第一访问请求访问所述第一存储设备。
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    第三判断模块,用于判断所述操作系统中是否挂载有第二存储设备对应的网络文件系统;
    第一获取模块,用于当所述操作系统中挂载有第二存储设备对应的网络文件系统 时,获取在所述操作系统中挂载第二存储设备对应的网络文件系统的路径,并作为预设路径;
    第一卸载模块,用于卸载在所述操作系统中挂载的所述第二存储设备对应的所述网络文件系统;
    所述创建模块还用于执行所述利用所述操作系统中的用户空间文件系统FUSE,在所述操作系统中的预设路径中创建第一存储设备对应的虚拟文件系统的步骤。
  8. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    第四判断模块,用于判断是否接收到用于在所述预设路径中挂载第二存储设备对应的网络文件系统的挂载请求;
    第二卸载模块,用于当接收到所述挂载请求时,卸载在所述预设路径中创建的第一存储设备对应的虚拟文件系统;
    挂载模块,用于在所述预设路径中挂载第二存储设备对应的网络文件系统;
    第五判断模块,用于判断是否接收到对所述预设路径的第二访问请求;
    第二发送模块,用于当接收到对所述预设路径的第二访问请求时,发送所述第二访问请求给所述网络文件系统,以使所述网络文件系统根据所述第二访问请求访问所述第二存储设备。
  9. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    第六判断模块,用于判断是否接收到用于通过所述预设路径的一个子路径在所述第一存储设备中创建待创建的文件夹的第二创建请求;所述第二创建请求携带所述待创建的文件夹的标识;
    第三发送模块,用于当接收到所述第二创建请求时,发送所述第二创建请求给所述虚拟文件系统;以使所述虚拟文件系统根据所述待创建的文件夹的标识,在所述第一存储设备中创建所述待创建的文件夹;
    建立模块,用于建立所述一个子路径与所述待创建的文件夹的标识之间的对应关系。
  10. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    第七判断模块,用于判断是否接收到用于通过所述预设路径的一个子路径在第一存 储设备中删除文件夹的删除请求;
    第二获取模块,用于当接收到所述删除请求时,获取预设子路径与文件夹的标识之间的对应关系;
    查找模块,用于在所述对应关系中查找所述一个子路径对应的文件夹的标识;
    第四发送模块,用于将所述一个子路径对应的文件夹的标识发送给所述虚拟文件系统;以使所述虚拟文件系统在所述第一存储设备中删除所述文件夹的标识对应的文件夹;
    删除模块,用于删除所述一个子路径与所述文件夹的标识之间的对应关系。
PCT/CN2016/084224 2015-06-08 2016-06-01 一种访问方法及装置 WO2016197838A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
KR1020187000296A KR102256890B1 (ko) 2015-06-08 2016-06-01 액세스 방법 및 장치
JP2017564112A JP6869193B2 (ja) 2015-06-08 2016-06-01 アクセス方法及び装置
EP16806736.1A EP3306897B1 (en) 2015-06-08 2016-06-01 Access method and apparatus
SG11201709815TA SG11201709815TA (en) 2015-06-08 2016-06-01 Access method and apparatus
US15/813,389 US11221997B2 (en) 2015-06-08 2017-11-15 On-demand creation and access of a virtual file system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510309492.7A CN106302609B (zh) 2015-06-08 2015-06-08 一种访问方法及装置
CN201510309492.7 2015-06-08

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/813,389 Continuation US11221997B2 (en) 2015-06-08 2017-11-15 On-demand creation and access of a virtual file system

Publications (1)

Publication Number Publication Date
WO2016197838A1 true WO2016197838A1 (zh) 2016-12-15

Family

ID=57502936

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084224 WO2016197838A1 (zh) 2015-06-08 2016-06-01 一种访问方法及装置

Country Status (7)

Country Link
US (1) US11221997B2 (zh)
EP (1) EP3306897B1 (zh)
JP (1) JP6869193B2 (zh)
KR (1) KR102256890B1 (zh)
CN (1) CN106302609B (zh)
SG (1) SG11201709815TA (zh)
WO (1) WO2016197838A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114302085A (zh) * 2021-12-23 2022-04-08 云从科技集团股份有限公司 数据存储方法、装置、电子设备及存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170371519A1 (en) * 2016-06-22 2017-12-28 Vmware, Inc. Automatic Document Handling with On-Demand Application Mounting
CN108664363B (zh) * 2018-05-17 2021-10-29 北京鲸鲨软件科技有限公司 一种基于双控的nas lun访问控制方法和装置
KR102142905B1 (ko) * 2018-11-19 2020-08-10 에이엠텔레콤 주식회사 통신 단말기의 사용자 파일 시스템 자동 복구 방법
US11520665B2 (en) * 2020-05-15 2022-12-06 EMC IP Holding Company LLC Optimizing incremental backup for clients in a dedupe cluster to provide faster backup windows with high dedupe and minimal overhead
CN112445764B (zh) * 2020-11-27 2024-05-31 北京五一视界数字孪生科技股份有限公司 文件操作的方法、装置、存储介质及电子设备
CN113312133B (zh) * 2021-06-17 2022-06-24 浙江齐安信息科技有限公司 操作方法、系统及存储介质
CN114185851B (zh) * 2022-02-14 2022-07-05 麒麟软件有限公司 安卓访问Linux本地目录和文件的方法与系统
CN117349236B (zh) * 2023-12-04 2024-03-29 深圳市科力锐科技有限公司 文件读取方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398821A (zh) * 2007-09-26 2009-04-01 新奥特硅谷视频技术有限责任公司 基于本地缓存和虚拟文件系统技术的网络存储方法及系统
CN101459669A (zh) * 2008-12-29 2009-06-17 成都市华为赛门铁克科技有限公司 一种网络文件系统的访问方法和装置
CN102682129A (zh) * 2012-05-17 2012-09-19 北京像素软件科技股份有限公司 一种基于虚拟文件系统的数据读取方法
CN103106260A (zh) * 2013-01-25 2013-05-15 南开大学 一种面向角色的虚拟文件系统的建立方法
US20140108755A1 (en) * 2012-10-12 2014-04-17 Somansa Co., Ltd. Mobile data loss prevention system and method using file system virtualization

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5015046B2 (ja) 2008-03-17 2012-08-29 株式会社リコー 情報処理装置及び情報処理方法
JP5481906B2 (ja) 2009-03-31 2014-04-23 日本電気株式会社 投影ファイルシステム管理装置及び投影ファイルシステム管理方法並びにプログラム
US8595440B2 (en) * 2010-03-31 2013-11-26 Hitachi Solutions, Ltd. File server apparatus, management method of storage system, and program
JP2011216013A (ja) 2010-04-01 2011-10-27 Sony Corp オーサリング方法、オーサリング装置及びプログラム
JP5485866B2 (ja) 2010-12-28 2014-05-07 株式会社日立ソリューションズ 情報管理方法、及び情報提供用計算機
JP2012243105A (ja) 2011-05-19 2012-12-10 Buffalo Inc ファイル管理装置及びその制御プログラム
KR101920239B1 (ko) * 2012-03-06 2018-11-20 삼성전자주식회사 파일 시스템 기능을 제공하는 단말기의 장치 및 방법
US9223795B2 (en) * 2013-03-05 2015-12-29 Xiaofeng Guo Managing network storage with a user-level file system
US9378100B2 (en) * 2013-05-17 2016-06-28 Go Daddy Operating Company, LLC Tools for storing, accessing and restoring website content via a website repository
CN103279521A (zh) * 2013-05-28 2013-09-04 重庆大学 一种基于Hadoop的视频大数据分布式解码方法
US9710481B1 (en) * 2014-09-26 2017-07-18 Amazon Technologies, Inc. Virtual application installation and storage for digital distribution platforms
CN104408053A (zh) * 2014-10-29 2015-03-11 上海斐讯数据通信技术有限公司 一种移动终端存储卡扩展方法
US10095707B1 (en) * 2014-12-19 2018-10-09 EMC IP Holding Company LLC Nearline cloud storage based on FUSE framework
CN104407946A (zh) * 2014-12-31 2015-03-11 浪潮电子信息产业股份有限公司 一种便捷的备份邮件到hdfs上的方法
CN104580517A (zh) * 2015-01-27 2015-04-29 浪潮集团有限公司 基于hdfs的访问方法和系统及用户本地系统设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398821A (zh) * 2007-09-26 2009-04-01 新奥特硅谷视频技术有限责任公司 基于本地缓存和虚拟文件系统技术的网络存储方法及系统
CN101459669A (zh) * 2008-12-29 2009-06-17 成都市华为赛门铁克科技有限公司 一种网络文件系统的访问方法和装置
CN102682129A (zh) * 2012-05-17 2012-09-19 北京像素软件科技股份有限公司 一种基于虚拟文件系统的数据读取方法
US20140108755A1 (en) * 2012-10-12 2014-04-17 Somansa Co., Ltd. Mobile data loss prevention system and method using file system virtualization
CN103106260A (zh) * 2013-01-25 2013-05-15 南开大学 一种面向角色的虚拟文件系统的建立方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3306897A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114302085A (zh) * 2021-12-23 2022-04-08 云从科技集团股份有限公司 数据存储方法、装置、电子设备及存储介质
CN114302085B (zh) * 2021-12-23 2024-02-20 云从科技集团股份有限公司 数据存储方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN106302609A (zh) 2017-01-04
KR102256890B1 (ko) 2021-05-31
JP6869193B2 (ja) 2021-05-12
KR20180016488A (ko) 2018-02-14
JP2018521405A (ja) 2018-08-02
US20180075060A1 (en) 2018-03-15
EP3306897B1 (en) 2022-01-19
EP3306897A4 (en) 2019-01-16
US11221997B2 (en) 2022-01-11
CN106302609B (zh) 2020-02-28
EP3306897A1 (en) 2018-04-11
SG11201709815TA (en) 2017-12-28

Similar Documents

Publication Publication Date Title
WO2016197838A1 (zh) 一种访问方法及装置
US10782880B2 (en) Apparatus and method for providing storage for providing cloud services
JP5976258B1 (ja) ライトインストーラ
US20140181301A1 (en) Heterogeneous cloud-store provider access systems, and/or associated methods
US10673823B2 (en) Migration containers
US10467424B2 (en) File system content based security
US20180067951A1 (en) Computer-implemented object management via tags
US8732429B2 (en) Preserving a deleted data volume
US10620871B1 (en) Storage scheme for a distributed storage system
US11444785B2 (en) Establishment of trusted communication with container-based services
EP4277239A1 (en) Cloud platform and bucket management method for object storage service provided thereby
WO2019085780A1 (zh) 一种云存储系统及用于云存储系统中实现自定义数据处理的方法
WO2016101662A1 (zh) 一种数据处理方法及相关服务器
US20230101774A1 (en) Techniques for performing clipboard-to-file paste operations
US9135116B1 (en) Cloud enabled filesystems provided by an agent which interfaces with a file system on a data source device
US11394748B2 (en) Authentication method for anonymous account and server
US10552404B2 (en) Retrospective snapshots in log-structured storage systems
US9696943B2 (en) Accessing stored data
WO2018036235A1 (zh) 一种solr数据迁移方法和装置
WO2018028321A1 (zh) 一种虚拟外置存储设备的管理方法、装置及终端
US10712959B2 (en) Method, device and computer program product for storing data
US10114664B1 (en) Systems and methods for automated delivery and identification of virtual drives
US10621148B1 (en) Maintaining multiple object stores in a distributed file system
US9378154B2 (en) Secure reservation mode for logical unit numbers and persistent reservations
US11853560B2 (en) Conditional role decision based on source environments

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: 16806736

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 11201709815T

Country of ref document: SG

ENP Entry into the national phase

Ref document number: 2017564112

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20187000296

Country of ref document: KR

Kind code of ref document: A