storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/docs/gateway/nas.md (about)

     1  # MinIO NAS Gateway [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io)
     2  
     3  MinIO Gateway adds Amazon S3 compatibility to NAS storage. You may run multiple minio instances on the same shared NAS volume as a distributed object gateway.
     4  
     5  ## Run MinIO Gateway for NAS Storage
     6  
     7  ### Using Docker
     8  
     9  Please ensure to replace `/shared/nasvol` with actual mount path.
    10  
    11  ```
    12  docker run -p 9000:9000 --name nas-s3 \
    13   -e "MINIO_ROOT_USER=minio" \
    14   -e "MINIO_ROOT_PASSWORD=minio123" \
    15   -v /shared/nasvol:/container/vol \
    16   minio/minio gateway nas /container/vol
    17  ```
    18  
    19  ### Using Binary
    20  
    21  ```
    22  export MINIO_ROOT_USER=minio
    23  export MINIO_ROOT_PASSWORD=minio123
    24  minio gateway nas /shared/nasvol
    25  ```
    26  
    27  ## Test using MinIO Browser
    28  
    29  MinIO Gateway comes with an embedded web based object browser. Point your web browser to http://127.0.0.1:9000 to ensure that your server has started successfully.
    30  
    31  ![Screenshot](https://raw.githubusercontent.com/minio/minio/master/docs/screenshots/minio-browser-gateway.png)
    32  
    33  ## Test using MinIO Client `mc`
    34  
    35  `mc` provides a modern alternative to UNIX commands such as ls, cat, cp, mirror, diff etc. It supports filesystems and Amazon S3 compatible cloud storage services.
    36  
    37  ### Configure `mc`
    38  
    39  ```
    40  mc alias set mynas http://gateway-ip:9000 access_key secret_key
    41  ```
    42  
    43  ### List buckets on nas
    44  
    45  ```
    46  mc ls mynas
    47  [2017-02-22 01:50:43 PST]     0B ferenginar/
    48  [2017-02-26 21:43:51 PST]     0B my-bucket/
    49  [2017-02-26 22:10:11 PST]     0B test-bucket1/
    50  ```
    51  
    52  ## Breaking changes
    53  
    54  There will be a breaking change after the release version 'RELEASE.2020-06-22T03-12-50Z'.
    55  
    56  ### The file-based config settings are deprecated in NAS
    57  
    58  The support for admin config APIs will be removed. This will include getters and setters like `mc admin config get` and `mc admin config`  and any other `mc admin config` options. The reason for this change is to avoid un-necessary reloads of the config from the disk. And to comply with the Environment variable based settings like other gateways.
    59  
    60  ### Migration guide
    61  
    62  The users who have been using the older config approach should migrate to ENV settings by setting environment variables accordingly.
    63  
    64  For example,
    65  
    66  Consider the following webhook target config.
    67  
    68  ```
    69  notify_webhook:1 endpoint=http://localhost:8080/ auth_token= queue_limit=0 queue_dir=/tmp/webhk client_cert= client_key=
    70  ```
    71  
    72  The corresponding environment variable setting can be
    73  
    74  ```
    75  export MINIO_NOTIFY_WEBHOOK_ENABLE_1=on
    76  export MINIO_NOTIFY_WEBHOOK_ENDPOINT_1=http://localhost:8080/
    77  export MINIO_NOTIFY_WEBHOOK_QUEUE_DIR_1=/tmp/webhk
    78  ```
    79  
    80  > NOTE: Please check the docs for the corresponding ENV setting. Alternatively, We can obtain other ENVs in the form `mc admin config set alias/ <sub-sys> --env`
    81  
    82  ## Symlink support
    83  
    84  NAS gateway implementation allows symlinks on regular files,
    85  
    86  ### Behavior
    87  
    88  - For reads symlink resolves to file symlink points to.
    89  - For deletes
    90    - Delete of symlink deletes the symlink but not the real file to which the symlink points.
    91    - Delete of actual file automatically makes symlink'ed file invisible, dangling symlinks won't be visible.
    92  
    93  #### Caveats
    94  - Disallows follow of directory symlinks to avoid security issues, and leaving them as is on namespace makes them very inconsistent.
    95  - Dangling symlinks are ignored automatically.
    96  
    97  *Directory symlinks is not and will not be supported as there are no safe ways to handle them.*
    98  
    99  ## Explore Further
   100  - [`mc` command-line interface](https://docs.min.io/docs/minio-client-quickstart-guide)
   101  - [`aws` command-line interface](https://docs.min.io/docs/aws-cli-with-minio)
   102  - [`minio-go` Go SDK](https://docs.min.io/docs/golang-client-quickstart-guide)