Updated on 2024-02-29 GMT+08:00

Introduction to obsfs

obsfs is a file system tool based on Filesystem in Userspace (FUSE) and provided by Object Storage Service (OBS), for mounting OBS parallel file systems to Linux operating systems. With obsfs, you can easily access the practically infinite storage of OBS as easily as accessing a local file system.

obsfs is a great option if you are used to storing data locally but your data is now stored in OBS.

Functions

  • Lets you mount a parallel file system to your local Linux file system, so that you can manage objects stored in OBS as if they were stored locally.
  • Supports synchronous upload. Any file uploaded to the mount directory can be synchronously uploaded to OBS.
  • Synchronizes objects from a parallel file system to its mount directory in the local file system, so that you can copy, modify, rename, or truncate objects locally and they will be automatically updated in OBS.

Constraints

  • The local directory that the parallel file system is mounted to does not need to be empty, but any files in that directory will be unavailable when the parallel file system is mounted. However, they will still be there when the parallel file system is unmounted later. To avoid any confusion this might cause, mount your parallel file system to an empty directory.
  • obsfs supports mounting of parallel file systems but not OBS buckets.
  • After an OBS parallel file system is mounted using obsfs, the newly generated mount directory cannot be used as an FTP directory.
  • A parallel file system that is mounted locally cannot provide the same performance and functions as an actual local file system. When using a mounted parallel file system, pay attention to the following points:
    • Files or folders in the mount directory do not support hard links.
    • There can be no more than 45 directory levels.
    • Since there is switching between user mode and kernel mode in FUSE, obsfs is not recommended for high-concurrency scenarios.
    • Linux commands (such as ls and stat) require remote access to the OBS server, which delivers poor performance.
  • A parallel file system can be mounted to multiple ECSs, but you need to prevent multiple ECSs from concurrently writing the same file.
  • Bucket policies and IAM policies at the bucket level are applied to the obsfs mounting mode, while those at the directory level are not.

Applicable Operating Systems

obsfs is compatible with Linux. For details, see Table 1.

Table 1 Obtaining obsfs

Method

Description

Compatible Distributions

Operation Guide

Download

Download and install the official software package and configure the environment (Linux), and obsfs is ready for use.

Ubuntu 16 and CentOS 7

Downloading and Installing obsfs