You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
3.8 KiB

  1. # Shared Backend Minio Quickstart Guide [![Slack](https://slack.minio.io/slack?type=svg)](https://slack.minio.io) [![Go Report Card](https://goreportcard.com/badge/minio/minio)](https://goreportcard.com/report/minio/minio) [![Docker Pulls](https://img.shields.io/docker/pulls/minio/minio.svg?maxAge=604800)](https://hub.docker.com/r/minio/minio/) [![codecov](https://codecov.io/gh/minio/minio/branch/master/graph/badge.svg)](https://codecov.io/gh/minio/minio)
  2. Minio shared mode lets you use single [NAS](https://en.wikipedia.org/wiki/Network-attached_storage) (like NFS, GlusterFS, and other
  3. distributed filesystems) as the storage backend for multiple Minio servers. Synchronization among Minio servers is taken care by design.
  4. Read more about the Minio shared mode design [here](https://github.com/minio/minio/blob/master/docs/shared-backend/DESIGN.md).
  5. Minio shared mode is developed to solve several real world use cases, without any special configuration changes. Some of these are
  6. - You have already invested in NAS and would like to use Minio to add S3 compatibility to your storage tier.
  7. - You need to use NAS with an S3 interface due to your application architecture requirements.
  8. - You expect huge traffic and need a load balanced S3 compatible server, serving files from a single NAS backend.
  9. With a proxy running in front of multiple, shared mode Minio servers, it is very easy to create a Highly Available, load balanced, AWS S3 compatible storage system.
  10. # Get started
  11. If you're aware of stand-alone Minio set up, the installation and running remains the same.
  12. ## 1. Prerequisites
  13. Install Minio - [Minio Quickstart Guide](https://docs.minio.io/docs/minio).
  14. ## 2. Run Minio on Shared Backend
  15. To run Minio shared backend instances, you need to start multiple Minio servers pointing to the same backend storage. We'll see examples on how to do this in the following sections.
  16. *Note*
  17. - All the nodes running shared Minio need to have same access key and secret key. To achieve this, we export access key and secret key as environment variables on all the nodes before executing Minio server command.
  18. - The drive paths below are for demonstration purposes only, you need to replace these with the actual drive paths/folders.
  19. #### Minio shared mode on Ubuntu 16.04 LTS.
  20. You'll need the path to the shared volume, e.g. `/mnt/nfs`. Then run the following commands on all the nodes you'd like to launch Minio.
  21. ```sh
  22. export MINIO_ACCESS_KEY=<ACCESS_KEY>
  23. export MINIO_SECRET_KEY=<SECRET_KEY>
  24. minio server /mnt/nfs
  25. ```
  26. #### Minio shared mode on Windows 2012 Server
  27. You'll need the path to the shared volume, e.g. `\\remote-server\smb`. Then run the following commands on all the nodes you'd like to launch Minio.
  28. ```cmd
  29. set MINIO_ACCESS_KEY=my-username
  30. set MINIO_SECRET_KEY=my-password
  31. minio.exe server \\remote-server\smb\export
  32. ```
  33. *Windows Tip*
  34. If a remote volume, e.g. `\\remote-server\smb` is mounted as a drive, e.g. `M:\`. You can use [`net use`](https://technet.microsoft.com/en-us/library/bb490717.aspx) command to map the drive to a folder.
  35. ```cmd
  36. set MINIO_ACCESS_KEY=my-username
  37. set MINIO_SECRET_KEY=my-password
  38. net use m: \\remote-server\smb\export /P:Yes
  39. minio.exe server M:\export
  40. ```
  41. ## 3. Test your setup
  42. To test this setup, access the Minio server via browser or [`mc`](https://docs.minio.io/docs/minio-client-quickstart-guide). You’ll see the uploaded files are accessible from the all the Minio shared backend endpoints.
  43. ## Explore Further
  44. - [Use `mc` with Minio Server](https://docs.minio.io/docs/minio-client-quickstart-guide)
  45. - [Use `aws-cli` with Minio Server](https://docs.minio.io/docs/aws-cli-with-minio)
  46. - [Use `s3cmd` with Minio Server](https://docs.minio.io/docs/s3cmd-with-minio)
  47. - [Use `minio-go` SDK with Minio Server](https://docs.minio.io/docs/golang-client-quickstart-guide)
  48. - [The Minio documentation website](https://docs.minio.io)