ossfs allows you to attach Object Storage Service (OSS) buckets as local file systems in Linux. Then, you can manage OSS objects in the same manner as you manage local files.

Runtime environment

ossfs is developed based on the file system in userspace (fuse), and can only be run on machines that support fuse. OSS provides installation packages for Ubuntu and CentOS. To run the packages in other environments, use source code to build the required program.

You can use ossfs over the Alibaba Cloud internal network or over the Internet. To improve the speed and stability of access, we recommend that you use an internal endpoint within the internal network environment.

Install ossfs

  • For more information about how to download and install ossfs, see Installation.
  • For more information how to configure ossfs, see Advanced settings.

Features

ossfs is built based on S3FS and incorporates all S3FS features, including:

  • Supports most features of the POSIX file system. For example, you can upload and download objects and directories, and set user permissions.
  • Uses multipart upload and resumable upload of OSS to upload objects by default.
  • Supports MD5 verification to ensure data integrity.

Usage notes

  • You cannot attach a bucket of the Archive storage class.
  • ossfs is unsuitable for scenarios that require highly concurrent read and write operations.
  • If you use ossfs to edit an object in OSS, the object is uploaded again.
  • When you perform metadata-related operations such as list directory, the performance of ossfs is compromised because you must remotely access the OSS server.
  • Errors may occur if you rename an object or a directory. Operation failures may cause data inconsistency between OSS and local disks.
  • If an OSS bucket is attached to multiple clients, you are responsible for maintaining data consistency. We recommend that you schedule the time for your users to use objects to prevent multiple clients from writing to the same object at the same time.
  • Hard links are not supported.
  • If an upload is interrupted before the object is completely uploaded, the uploaded portion is stored as parts in an OSS bucket. If you no longer need these parts, you can use the following methods to delete them to avoid additional storage fees.
    • Manually delete parts. For more information, see Manage parts.
    • Use lifecycle rules to automatically delete parts. For more information, see Lifecycle rules.
Notice The performance and features of ossfs are not as good as those of local file systems because data must be synchronized to the cloud over networks. Exercise caution when you want to use ossfs for applications that have high I/O requirements, such as databases.