storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/docs/shared-backend/README.md (about)

     1  # Shared Backend MinIO Quickstart Guide [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io)  [![Docker Pulls](https://img.shields.io/docker/pulls/minio/minio.svg?maxAge=604800)](https://hub.docker.com/r/minio/minio/)
     2  
     3  MinIO shared mode lets you use single [NAS](https://en.wikipedia.org/wiki/Network-attached_storage) (like NFS, GlusterFS, and other 
     4  distributed filesystems) as the storage backend for multiple MinIO servers. Synchronization among MinIO servers is taken care by design. 
     5  Read more about the MinIO shared mode design [here](https://github.com/minio/minio/blob/master/docs/shared-backend/DESIGN.md).
     6  
     7  MinIO shared mode is developed to solve several real world use cases, without any special configuration changes. Some of these are
     8  
     9  - You have already invested in NAS and would like to use MinIO to add S3 compatibility to your storage tier.
    10  - You need to use NAS with an S3 interface due to your application architecture requirements.
    11  - You expect huge traffic and need a load balanced S3 compatible server, serving files from a single NAS backend. 
    12  
    13  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. 
    14  
    15  # Get started
    16  
    17  If you're aware of stand-alone MinIO set up, the installation and running remains the same. 
    18  
    19  ## 1. Prerequisites
    20  
    21  Install MinIO - [MinIO Quickstart Guide](https://docs.min.io/docs/minio-quickstart-guide).
    22  
    23  ## 2. Run MinIO on Shared Backend
    24  
    25  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.
    26  
    27  *Note*
    28  
    29  - 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.
    30  - The drive paths below are for demonstration purposes only, you need to replace these with the actual drive paths/folders.
    31  
    32  #### MinIO shared mode on Ubuntu 16.04 LTS. 
    33  
    34  You'll need the path to the shared volume, e.g. `/path/to/nfs-volume`. Then run the following commands on all the nodes you'd like to launch MinIO.
    35  
    36  ```sh
    37  export MINIO_ROOT_USER=<ACCESS_KEY>
    38  export MINIO_ROOT_PASSWORD=<SECRET_KEY>
    39  minio gateway nas /path/to/nfs-volume
    40  ```
    41  
    42  #### MinIO shared mode on Windows 2012 Server
    43  
    44  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.
    45  
    46  ```cmd
    47  set MINIO_ROOT_USER=my-username
    48  set MINIO_ROOT_PASSWORD=my-password
    49  minio.exe gateway nas \\remote-server\smb\export
    50  ```
    51  
    52  *Windows Tip*
    53  
    54  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. 
    55  
    56  ```cmd
    57  set MINIO_ROOT_USER=my-username
    58  set MINIO_ROOT_PASSWORD=my-password
    59  net use m: \\remote-server\smb\export /P:Yes
    60  minio.exe gateway nas M:\export
    61  ```
    62  
    63  ## 3. Test your setup
    64  
    65  To test this setup, access the MinIO server via browser or [`mc`](https://docs.min.io/docs/minio-client-quickstart-guide). You’ll see the uploaded files are accessible from the all the MinIO shared backend endpoints.
    66  
    67  ## Explore Further
    68  - [Use `mc` with MinIO Server](https://docs.min.io/docs/minio-client-quickstart-guide)
    69  - [Use `aws-cli` with MinIO Server](https://docs.min.io/docs/aws-cli-with-minio)
    70  - [Use `s3cmd` with MinIO Server](https://docs.min.io/docs/s3cmd-with-minio)
    71  - [Use `minio-go` SDK with MinIO Server](https://docs.min.io/docs/golang-client-quickstart-guide)
    72  - [The MinIO documentation website](https://docs.min.io)