Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Minio
  3. How to use Volumes in Minio?

How to use Volumes in Minio?

Scheduled Pinned Locked Moved Solved Minio
miniovolumes
13 Posts 3 Posters 3.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by
      #1

      I tried to use the new Volumes in Minio but somehow I can't. What I did:

      1. create Volume
      2. Mount Volume in app
      3. checked via Console if it is availabe at /media: YES

      But then, it seems there is no config in a running app to change the storage from /data to /media.

      In the docs (https://docs.minio.io/docs/minio-server-configuration-guide) it says nothing about storage location except during creation of the container itself.

      Or am I looking in the wrong direction πŸ˜‰

      girishG 1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        As far as I understand, you can edit the env.sh file created after first run in minio. There is a line export CLOUDRON_MINIO_STARTUP_ARGS='server /app/data/data' and you should be able to adjust that /app/data/data path to point to the volume instead.

        This would not migrate any existing data of course, but should work on a fresh installation.

        imc67I 1 Reply Last reply
        0
        • nebulonN nebulon

          As far as I understand, you can edit the env.sh file created after first run in minio. There is a line export CLOUDRON_MINIO_STARTUP_ARGS='server /app/data/data' and you should be able to adjust that /app/data/data path to point to the volume instead.

          This would not migrate any existing data of course, but should work on a fresh installation.

          imc67I Offline
          imc67I Offline
          imc67
          translator
          wrote on last edited by
          #3

          @nebulon ok good suggestions, I've tried it but then ran into the issue I couldn't login anymore:

          1. moved the data inside data/data to /srv/s3-01
          2. changed env.sh
          3. app didn't start because of error: ERROR CUnable to initialize backend: Unable to write to the backend Dec 08 11:20:17 C> Please ensure MinIO binary has write permissions for the backend
          4. because WebTerminal in app didn't work I had to stop app and changed back env.sh
          5. after restart app, in WebTerminal executed : sudo chown -R cloudron /media/s3-01 && sudo chmod u+rxw /media/s3-01
          6. changed env.sh again
          7. in WebTerminal I can reach the mount and there are no errors
          8. Try to login the web-GUI: The access key ID you provided does not exist in our records
          9. tested /app/code/minio-credentials get and got the correct credentials .....?!?!?

          I think I will start with a fresh app and delete the 300GB backup data from my MacBook and let's hope that latter doesn't crash in the meantime πŸ˜‰

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            Well I would suggest to test this with a fresh minio instance first to ensure the process works!

            I think there might be more places which need to be made adjustable regarding the credentials. That being said maybe the server <folder> approach was not the best one in the first place, just what came to mind.

            imc67I 1 Reply Last reply
            0
            • nebulonN nebulon

              Well I would suggest to test this with a fresh minio instance first to ensure the process works!

              I think there might be more places which need to be made adjustable regarding the credentials. That being said maybe the server <folder> approach was not the best one in the first place, just what came to mind.

              imc67I Offline
              imc67I Offline
              imc67
              translator
              wrote on last edited by
              #5

              @nebulon I've found some more: the actual config files are created after reboot in the new volume (hidden), and they don't contain the "old" credentials. The Cloudron script /app/code/minio-credentials is hardcoded to create them in data/data instead of the new volume.

              1 Reply Last reply
              0
              • imc67I Offline
                imc67I Offline
                imc67
                translator
                wrote on last edited by imc67
                #6

                End of the story:

                1. migration did not succeed (I think Minio also doesn't like moving files in the background?)
                2. created a new app
                3. added Volume
                4. changed the sudo chown -R cloudron /media/s3-01 && sudo chmod u+rxw /media/s3-01
                5. changed the env.sh
                6. changed the config in /media/s3-01/.minio.sys/config/config.json (search for minioadmin and change those access and secret keys)
                7. I deleted the .minio.sys in the data/data
                8. started the app

                Now buckets are created in the Volume and backup to Minio seems to work (at least I do see now about 400Mbit upload from my MacBook)

                1 Reply Last reply
                1
                • imc67I imc67

                  I tried to use the new Volumes in Minio but somehow I can't. What I did:

                  1. create Volume
                  2. Mount Volume in app
                  3. checked via Console if it is availabe at /media: YES

                  But then, it seems there is no config in a running app to change the storage from /data to /media.

                  In the docs (https://docs.minio.io/docs/minio-server-configuration-guide) it says nothing about storage location except during creation of the container itself.

                  Or am I looking in the wrong direction πŸ˜‰

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  @imc67 Why do you want to make it use a volume? Minio's /app/data is really it's "database" and is not meant to be shared with others. If you just want to move the storage location to some other place, you should use the Move Data Directory configuration.

                  The volumes stuff is really for content/files that can be used by all apps. It's not meant for one app to share it's internal data with another.

                  imc67I 1 Reply Last reply
                  1
                  • girishG girish

                    @imc67 Why do you want to make it use a volume? Minio's /app/data is really it's "database" and is not meant to be shared with others. If you just want to move the storage location to some other place, you should use the Move Data Directory configuration.

                    The volumes stuff is really for content/files that can be used by all apps. It's not meant for one app to share it's internal data with another.

                    imc67I Offline
                    imc67I Offline
                    imc67
                    translator
                    wrote on last edited by
                    #8

                    @girish I use this as a backup location for my MacBook and with the many updates of Minio I forgot sometimes to disable backups at updating the app. I don’t want a backup of my backup πŸ˜‰

                    girishG 1 Reply Last reply
                    0
                    • imc67I imc67

                      @girish I use this as a backup location for my MacBook and with the many updates of Minio I forgot sometimes to disable backups at updating the app. I don’t want a backup of my backup πŸ˜‰

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      @imc67 Ah, this is a workaround for forgetting to disable backups during minio update! Eventually, volumes will gain backup feature and your workflow might break πŸ™‚

                      Maybe at the browser session level, the checkbox state of the Update dialog can be remembered (at a per-app level). Would that help?

                      imc67I 1 Reply Last reply
                      2
                      • girishG girish

                        @imc67 Ah, this is a workaround for forgetting to disable backups during minio update! Eventually, volumes will gain backup feature and your workflow might break πŸ™‚

                        Maybe at the browser session level, the checkbox state of the Update dialog can be remembered (at a per-app level). Would that help?

                        imc67I Offline
                        imc67I Offline
                        imc67
                        translator
                        wrote on last edited by
                        #10

                        @girish said in How to use Volumes in Minio?:

                        Maybe at the browser session level, the checkbox state of the Update dialog can be remembered (at a per-app level). Would that help?

                        I remember this kind of thing is indeed suggested before in the forum, however if only on browser session then it will be different when using other browsers at the same time I guess?

                        girishG 1 Reply Last reply
                        1
                        • imc67I imc67

                          @girish said in How to use Volumes in Minio?:

                          Maybe at the browser session level, the checkbox state of the Update dialog can be remembered (at a per-app level). Would that help?

                          I remember this kind of thing is indeed suggested before in the forum, however if only on browser session then it will be different when using other browsers at the same time I guess?

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #11

                          @imc67 I think previously @nebulon defaulted the value to the value of "automatic backups" but that change wasn't correct, so we had reverted it. This is because just because the user didn't want automatic daily backups, doesn't mean he doesn't want backup during an update.

                          @nebulon Is it easy to store the checkbox state per app (in localstorage or something?). What do you think?

                          nebulonN 1 Reply Last reply
                          0
                          • girishG girish

                            @imc67 I think previously @nebulon defaulted the value to the value of "automatic backups" but that change wasn't correct, so we had reverted it. This is because just because the user didn't want automatic daily backups, doesn't mean he doesn't want backup during an update.

                            @nebulon Is it easy to store the checkbox state per app (in localstorage or something?). What do you think?

                            nebulonN Offline
                            nebulonN Offline
                            nebulon
                            Staff
                            wrote on last edited by
                            #12

                            @girish I guess we can store that in localstorage, hopefully thought does not get confusing when using more than one browser then. Generally I am questioning here why the manual update even comes into play on such a regular basis that this checkbox is an issue in the first place.

                            imc67I 1 Reply Last reply
                            0
                            • nebulonN nebulon

                              @girish I guess we can store that in localstorage, hopefully thought does not get confusing when using more than one browser then. Generally I am questioning here why the manual update even comes into play on such a regular basis that this checkbox is an issue in the first place.

                              imc67I Offline
                              imc67I Offline
                              imc67
                              translator
                              wrote on last edited by
                              #13

                              @nebulon for me it is no issue anymore because of the Volumes. In this Minio app I don't share the Volume with other apps and it's not backed up just like I want.

                              Hopefully in future releases, like @girish wrote, when they will be backed up there will also be an option to never backup specific Volumes?

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search