This topic describes how Linux users can use ossfs 2.0 to mount an Object Storage Service (OSS) bucket to a local file system.
Prerequisites
ossfs 2.0 is installed and configured.
Create a directory for mounting the bucket
The name and path of the mount directory can be configured freely based on your use case. In this example, the /tmp/ossfs2-bucket directory is created for mounting the bucket.
sudo mkdir /tmp/ossfs2-bucketMount a bucket
Below is the sample command for mounting the bucket specified in the configuration file ossfs2.conf to the local directory /tmp/ossfs2-bucket/. For more examples of configuring ossfs 2.0, see Common configuration examples for ossfs 2.0.
sudo ossfs2 mount /tmp/ossfs2-bucket/ -c /etc/ossfs2.conf Unmount a mounted bucket
Below is the sample command for unmounting the bucket that has been mounted at /tmp/ossfs2-bucket/.
sudo umount /tmp/ossfs2-bucket/