Instantly share code, notes, and snippets.

Embed
What would you like to do?
REX-Ray with Minio

Getting Started

The following command will install the latest version of REX-Ray to /usr/bin/rexray on Linux systems:

$ sudo apt install s3fs
$ curl -sSL https://dl.bintray.com/emccode/rexray/install | sh

Depending on the Linux distribution REX-Ray will be registered as either a SystemD or SystemV service.

Configure

REX-Ray requires a configuration file for storing details used to communicate with storage providers. This can include authentication credentials and driver specific configuration options. After REX-Ray has been installed, copy and paste the contents below to a new file on the host at /etc/rexray/config.yml to configure s3fs storage driver.

libstorage:
  service: s3fs
s3fs:
  accessKey: Q3AM3UQ867SPQQA43P2F
  secretKey: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
  endpoint: https://play.minio.io:9000  
  region: us-east-1
  disablePathStyle: false 
  options:
  - url=https://play.minio.io:9000
  - use_path_request_style
  - nonempty

To verify the configuration file is working, use REX-Ray to list the volumes:

sudo rexray volume new testbucket
sudo rexray volume ls
ID                                                            Name                                                          Status    Size
testbucket                                                    testbucket                                                    attached  0

Start as service

Container platforms rely on REX-Ray to be running as a service to function properly. For instance, Docker communicates to the REX-Ray Volume Driver via a UNIX socket file.

sudo rexray service start

Mount a volume

After a volume has been created, the rexray volume mount command can be used to both attach and mount it to the current host:

sudo rexray volume mount testbucket
ID          Name        Status    Size  Path
testbucket  testbucket  attached  0     /var/lib/rexray/volumes/testbucket/data

Unmount a volume

Once a volume is no longer needed, the rexray volume unmount command will unmount the volume:

sudo rexray volume unmount
ID          Name        Status     Size
testbucket  testbucket  available  0
libstorage:
service: s3fs
s3fs:
accessKey: Q3AM3UQ867SPQQA43P2F
secretKey: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
endpoint: https://play.minio.io:9000
region: us-east-1
disablePathStyle: false
options:
- url=https://play.minio.io:9000
- use_path_request_style
- allow_other
- nonempty
@TuanAnhBien

This comment has been minimized.

TuanAnhBien commented Sep 25, 2017

Hi @harshavardhana , i got a problem when run command: sudo rexray volume mount testbucket444, like below:
FATA[0000] error mounting volume error=open testbucket444: no such file or directory volume=testbucket444

I'm using:

  • rexray v0.10.2,
  • docker v1.13.1
  • ubuntu 14.04
@prein

This comment has been minimized.

prein commented Oct 4, 2017

Thanks for sharing your config. Very helpful. Worked like a charm.

Do you know of any way to make it work as docker managed plugin? It doesn't accept S3FS_ENDPOINT variable. I'm trying to install rexray/s3fs:edge

@zjuchenyuan

This comment has been minimized.

zjuchenyuan commented Oct 6, 2017

@TuanAnhBien
Hi, I also encountered the same problem, but I fixed it by

apt install s3fs
@Sovetnikov

This comment has been minimized.

Sovetnikov commented Oct 14, 2017

Docker managed plugin solution example will be great, since minfs docker plugin works like a charm
With rexray i have troubles starting from installing docker plugin and then configuring it with custom endpoint.
And i have no idea how to configure it in docker-compose as it requires endpoint keys to be provided at plugin creation time...

@harshavardhana

This comment has been minimized.

Owner

harshavardhana commented Nov 23, 2017

Docker managed plugin solution example will be great, since minfs docker plugin works like a charm

MinFS is deprecated you shouldn't use it. @Sovetnikov

@milewski

This comment has been minimized.

milewski commented Aug 20, 2018

do you know how to set the configuration when installing it by docker plugin install rexray/s3fs ?

@zx1986

This comment has been minimized.

zx1986 commented Sep 12, 2018

do you know how to set the configuration when installing it by docker plugin install rexray/s3fs ?

I am looking for the solution too ...


https://blog.vizuri.com/practical-persistent-cloud-storage-for-docker-in-aws-using-rexray-pt-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment