A network filesystem client to connect to Minio and Amazon S3 compatible cloud storage servers
DEPRECATED - This project is deprecated and not maintained anymore. It is recommended for all users to use one of the following options intead.
MinFS is a fuse driver for Amazon S3 compatible object storage server. MinFS lets you mount a remote bucket (from a S3 compatible object store), as if it were a local directory. This allows you to read and write from the remote bucket just by operating on the local mount directory.
MinFS helps legacy applications use modern object stores with minimal config changes. MinFS uses BoltDB for caching and saving metadata, list of files, permissions, owners etc.
Be careful, it is always possible to remove boltdb cache. Cache will be recreated by MinFS synchronizing metadata from the server.
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.
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.
Download the pre-built RPMs from here
sh yum install minfs-0.0.20170226202056-1.x86_64.rpm
Create a new
config.jsonin /etc/minfs directory with your S3 server access and secret keys.
This example uses play.minio.io:9000
https://play.minio.io:9000/mybucket /mnt/mounted/mybucket minfs defaults,cache=/tmp/mybucket 0 0
Now proceed to mount
sh mount /mnt/mounted/mybucket
mybucketis mounted and is accessible.
ls -F /mnt/mounted/mybucket etc/ issue
MinFS can also be used via the MinFS Docker volume 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.
docker-composeto 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
nginxcontainer to serve the static content from the bucket.
version: '2' services: my-test-server: image: nginx ports: - "80:80" volumes: - my-test-store:/usr/share/nginx/html:ro
volumes: my-test-store: driver: minio/minfs driver_opts: endpoint: https://play.minio.io:9000 access-key: Q3AM3UQ867SPQQA43P2F secret-key: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG bucket: testbucket opts: cache=/tmp/my-test-store
Please change theendpoint,access-key,secret-keyandbucketfor your local Minio setup.
Once you have successfully created
docker-compose.ymlconfiguration in your current working directory.
sh 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
sh docker volume create -d minio/minfs \ --name my-test-store \ -o endpoint=https://play.minio.io:9000 \ -o access-key=Q3AM3UQ867SPQQA43P2F \ -o secret-key=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG \ -o bucket=testbucket -o opts=cache=/tmp/my-test-store
Please change theendpoint,access-key,secret-key,bucketandoptsfor your local Minio setup.
Once you have successfully created the volume, start a new container with
my-test-storeattached. In the example below
nginxcontainer 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
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
Welcome to nginx!
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
Thank you for using nginx.