Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.9 KB

s3fs-fuse-with-minio.md

File metadata and controls

61 lines (37 loc) · 1.9 KB

s3fs-fuse with Minio Server Slack

s3fs allows Linux and Mac OS X to mount an S3 bucket via FUSE. Please note that you will not be able to create directories with s3fs because Minio does not support creating folders.

In this recipe we will learn how to configure and use s3fs to mount a bucket from the Minio Server and copy data to it.

1. Prerequisites

Install Minio Server from here.

2. Installation

Install s3fs-fuse from https://github.com/s3fs-fuse/s3fs-fuse.

Create a bucket on the Minio Server to use with this cookbook. https://docs.minio.io/docs/minio-client-quickstart-guide.

3. Configuration

Before you run s3fs, you will need to save your Minio credentials in a file that will be used later in this tutorial. In the command below, replace access_key and secret_key with your actual Minio credentials.

echo "access_key:secret_key" > /etc/s3cred

Now create a directory to mount the bucket. I will use /s3 for this cookbook to keep it simple.

mkdir /s3

Run s3fs to mount the bucket from the Minio server using the Minio credentials from the previous command.

s3fs <bucket> /s3 -o passwd_file=/etc/s3cred,use_path_request_style,url=http://minio-server:9000

use_path_request_style is required for s3fs to work with Minio. If you do not use it, you will not be able to see or copy files in the mounted directory.

Check to see that the bucket is mounted with the mount command:

mount | grep s3fs

s3fs on /s3 type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0)

Copy a file to the mounted bucket:

cp /etc/resolv.conf /s3

Verify that the file exists with the Minio command-line utility mc:

# mc ls <minio-server>/<bucket>
[2017-04-07 21:49:39 PDT]    49B resolv.conf

Now you are all set to enjoy using Minio with s3fs!