Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Add minfs POSIX compatible section
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored and minio-trusted committed Sep 29, 2017
1 parent 02e56dd commit 5d628bf
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,29 @@ MinFS helps legacy applications use modern object stores with minimal config cha

> Be careful, it is always possible to remove boltdb cache. Cache will be recreated by MinFS synchronizing metadata from the server.
## MinFS RPMs
## POSIX Compatibility
> MinFS is not a POSIX conformant filesystem and it does not intend to be one. MinFS is built for legacy applications that needs to access an object store but does not expect strict POSIX compatibility. Please use MinFS if this fits your needs.
### Minimum Requirements
Use cases not suitable for MinFS use are:
- Running a database on MinFS such as postgres, mysql etc.
- Running virtual machines on MinFS such as qemu/kvm.
- Running rich POSIX applications which rely on POSIX locks, Extended attribute operations etc.

Some use cases suitable for MinFS are:
- Serving a static web-content with NGINX, Apache2 web servers.
- Serving as backup destination for legacy tools unable to speak S3 protocol.

## MinFS RPMs
### Minimum Requirements
- [RPM Package Manager](http://rpm.org/)

### Install

Download the pre-built RPMs from [here](https://github.com/minio/minfs/releases/tag/RELEASE.2017-02-26T20-20-56Z)

```sh
yum install minfs-0.0.20170226202056-1.x86_64.rpm
```

### Update `config.json`

Create a new `config.json` in /etc/minfs directory with your S3 server access and secret keys.

> This example uses [play.minio.io:9000](https://play.minio.io:9000)
Expand All @@ -31,36 +38,29 @@ Create a new `config.json` in /etc/minfs directory with your S3 server access an
```

### Mount `mybucket`

Create an `/etc/fstab` entry

```
https://play.minio.io:9000/mybucket /mnt/mounted/mybucket minfs defaults,cache=/tmp/mybucket 0 0
```

Now proceed to mount `fstab` entry.

```sh
mount /mnt/mounted/mybucket
```

Verify if `mybucket` is mounted and is accessible.

```
ls -F /mnt/mounted/mybucket
etc/ issue
```

## MinFS Docker Volume plugin

MinFS can also be used via the [MinFS Docker volume plugin](https://github.com/minio/minfs/tree/master/docker-plugin). You can mount a local folder onto a Docker container, without having to go through the dependency installation or the mount and unmount operations of MinFS.

### Minimum Requirements

- [Docker Engine](http://docker.com/) v1.13.0 and above.

### Using Docker Compose

Use `docker-compose` to create a volume using the plugin and share the volume with other containers. In the example below the volume is created using the minfs plugin and and used by `nginx` container to serve the static content from the bucket.

```yml
Expand All @@ -84,12 +84,9 @@ volumes:
opts: cache=/tmp/my-test-store
```
<blockquote>
Please change the `endpoint`, `access-key`, `secret-key` and `bucket` for your local Minio setup.
</blockquote>
> Please change the `endpoint`, `access-key`, `secret-key` and `bucket` for your local Minio setup.

Once you have successfully created `docker-compose.yml` configuration in your current working directory.

```sh
docker-compose up
```
Expand All @@ -98,13 +95,11 @@ docker-compose up
One can even manually install the plugin, create and the volume using docker.

Install the plugin

```sh
docker plugin install minio/minfs
```

Create a docker volume `my-test-store` using `minio/minfs` driver.

```sh
docker volume create -d minio/minfs \
--name my-test-store \
Expand All @@ -115,21 +110,16 @@ docker volume create -d minio/minfs \
-o opts=cache=/tmp/my-test-store
```

<blockquote>
Please change the `endpoint`, `access-key`, `secret-key`, `bucket` and `opts` for your local Minio setup.
</blockquote>
> Please change the `endpoint`, `access-key`, `secret-key`, `bucket` and `opts` for your local Minio setup.

Once you have successfully created the volume, start a new container with `my-test-store` attached.
In the example below `nginx` container is run to serve pages from the new volume.

```sh
docker run -d --name my-test-server -p 80:80 -v my-test-store:/usr/share/nginx/html:ro nginx
```

### Test `nginx` Service

Either of the above steps create a MinFS based volume for a Nginx container. Verify if your nginx container is running properly and serving content.

```sh
curl localhost
```
Expand Down

0 comments on commit 5d628bf

Please sign in to comment.