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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Filesystem Mount inside Container

    NocoDB
    5
    20
    790
    Loading More Posts
    • 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.
    • benborges
      benborges last edited by benborges

      Im finding myself in the same situation, I have my volumes mounted as Filesytem volumes, but even with permissions set to Yellowtent, I can't cd into the folder or I can't access the file inside the volume directly.

      I get "no such file or directory"

      But by reading this thread, I see that the advice is to chown it to Cloudron user, not yellowtent, so Imma try that.

      edit: well actually, the "cloudron" user is the yellowtent user on the host
      so I'm not sure what else I can do to get this rolling.

      Cloudron volumes view :
      0e8a722b-c508-4697-a6b6-3a9632b2c166-image.png

      From cloudron nocodb app :
      d848ae26-ffe3-49d6-ad43-5b64e2dae540-image.png

      from the terminal container :
      75cba328-7ccc-44ed-a726-232f87099f96-image.png

      With nocodb :
      583d305a-e4b5-40eb-bd14-88057ca0ee96-image.png

      BenB

      benborges 1 Reply Last reply Reply Quote 0
      • benborges
        benborges @benborges last edited by

        As you can deduce, I want to read that sqlite file that I symlinked inside /opt/amplifyukraine and then mounted as filesystem volume so that I can add it to the container, it all appears to work but the moment I want to get inside the mount and actualy read the file, or even just LS into the folder, I can't..

        "no such file or directory"

        BenB

        benborges 1 Reply Last reply Reply Quote 0
        • benborges
          benborges @benborges last edited by

          7866b6ce-0483-4b52-9843-44d474d99a55-image.png

          I'm wondering if I'm doing anything wrong or if what i'm doing cannot be done ? and at the same time I'm so close to get it how I want, I hope I can do this with this static sqlite file

          Maybe I shouldn't have mounted these volumes from /OPT and instead used /MNT or /SRV to have these filesystem mounts, does it matter ?

          BenB

          benborges 1 Reply Last reply Reply Quote 0
          • Referenced by  girish girish 
          • benborges
            benborges @benborges last edited by

            Well I don't know but /SRV with proper permissions (yellowtent) works !
            I can finally see the content of the mount from the file manager.

            Maybe my problem is that I have to remount these volumes now that I changed ownership ?

            anyway, will try some more but this is a good step forward : ca9e622f-501b-4213-9d26-96599a11f666-image.png

            BenB

            benborges 1 Reply Last reply Reply Quote 2
            • benborges
              benborges @benborges last edited by benborges

              it's working !!

              I have nocodb reading this sqlite file and I can add layers of data on top while tg-archive is feeding new posts to the base itself,

              tldr :

              I have tg-archive running at /home/tg-archive/

              there I have a site folder that sync from telegram and output static sites.

              But I wanted to be able to have research, filtering, sorting with a simple front-end, that's where nocodb comes in.

              All I did was a clean symlink for yellowtent user/group from /home/tg-archive/sites/telehunt/ to /srv/telehunt/

              ln -s /home/tg-archive/sites/telehunt/ /srv/telehunt
              
              sudo chown -h yellowtent:yellowtent telehunt/ inside /srv/
              

              then I added this as filesystem mount in the volumes view pointing to /srv/telehunt/ with name telehuntsrv

              next I attached this volume to the nocodb container, when it's running, I added the path to the sqlite file /media/telehuntsrv/data.sqlite

              And voila
              e43503c1-83de-48e4-b257-1b06987f92a6-image.png

              68e3950e-7ca3-4c03-b00d-6fcc8b9ce605-image.png

              BenB

              benborges 1 Reply Last reply Reply Quote 5
              • benborges
                benborges @benborges last edited by

                Oh my god I love cloudron ! Solved !

                BenB

                Supaiku 1 Reply Last reply Reply Quote 3
                • Supaiku
                  Supaiku @benborges last edited by

                  @benborges Thanks, this helped me!

                  Symlinked from my SATA HDD mount on the filesystem into the /srv/ directory and chowned and it works.

                  Not sure why it only works into the /srv/ directory though. Curious about that...

                  girish 1 Reply Last reply Reply Quote 1
                  • Referenced by  Supaiku Supaiku 
                  • girish
                    girish Staff @Supaiku last edited by

                    @Supaiku said in Filesystem Mount inside Container:

                    Not sure why it only works into the /srv/ directory though. Curious about that...

                    currently, the list of directories that can be mounted into apps is hardcoded. This is done for basic security. Like you wouldn't want /home or /etc of host mounted into app by mistake or maliciously.

                    Supaiku 1 Reply Last reply Reply Quote 1
                    • Supaiku
                      Supaiku @girish last edited by

                      @girish that makes sense - I didn't see anything about this list or how it's hardcoded in the Docs, did I just miss that or is it not mentioned there?

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @Supaiku last edited by girish

                        @Supaiku indeed, it's not listed anywhere in the docs. I will get that sorted out.

                        edit: added note in https://docs.cloudron.io/volumes/#filesystem

                        Supaiku 2 Replies Last reply Reply Quote 1
                        • Supaiku
                          Supaiku @girish last edited by

                          @girish w00t! 🙂

                          Interestingly in my case I was trying to add something mounted under /media/ but it wasn't working. Perhaps something else was amiss there or it was updated since.

                          1 Reply Last reply Reply Quote 0
                          • Supaiku
                            Supaiku @girish last edited by

                            @girish I actually discovered that what I thought had worked didn't, the symlinks to the mounted drive do not work (I had accidentally just used directories inside of directories that weren't properly symlinked, and there are also symlinked directories which do work), they give the same "hostPath does not exist" error even inside /srv/ (and also inside their non-symlinked mount point inside media)

                            Why wouldn't these mount points be visible to cloudron?

                            /etc/fstab line:

                            UUID=29608fe1-0f6c-4326-b10f-94750492ba49 /media/r00buntu/Data ext4 defaults,users,rw,auto 0 0
                            

                            As you can see it's mounted within /media
                            But it's also symlinked within the srv directory for example: /srv/rzn-bk/backups-sym and when trying to add that it won't add. Same goes for just /srv/backups-sym

                            All host path does not exist...

                            nebulon girish 2 Replies Last reply Reply Quote 0
                            • nebulon
                              nebulon Staff @Supaiku last edited by

                              @Supaiku have you tried to add a volume in Cloudron with the existing mountpoint option? The symlink as such will not work as Cloudron will resolve the mount point directly

                              1 Reply Last reply Reply Quote 1
                              • girish
                                girish Staff @Supaiku last edited by

                                @Supaiku on Cloudron, the only way to expose paths from host into apps is to use Volumes.

                                If you want to manage the mount on host yourself, first add a Volume using File system (mountpoint) - https://docs.cloudron.io/volumes/#filesystem-mountpoint . If possible, I would actually use one of the "managed" mount types instead of editing fstab directly, but I don't know your setup.

                                After you have created the volume, you have to then "mount" this into whichever app(s) you want - https://docs.cloudron.io/apps/#mounts

                                Supaiku 1 Reply Last reply Reply Quote 0
                                • Supaiku
                                  Supaiku @girish last edited by Supaiku

                                  @girish I also use the volume in my linux install on my home server for other services, so it's mounted when the server boots up

                                  trying to add it via the filesystem mountpoint results in the same error:
                                  d2ee227b-8297-4fc5-9b23-14fe70b99e9f-image.png

                                  It is a EXT4 formatted disk, so I tried that one and got this:
                                  c35b10c5-2cec-4768-86ba-6838d2c91f2d-image.png

                                  Perhaps because it's already mounted?
                                  9659986f-775d-430c-aceb-cfb7d92d963e-image.png

                                  I'll find an extra drive and hook it up and see if I can get it work with something fresh.

                                  girish benborges 2 Replies Last reply Reply Quote 0
                                  • girish
                                    girish Staff @Supaiku last edited by

                                    @Supaiku said in Filesystem Mount inside Container:

                                    It is a EXT4 formatted disk, so I tried that one and got this:

                                    There is a typo - it says /dev/diesk instead of /dev/disk . Could it be that?

                                    Supaiku 1 Reply Last reply Reply Quote 1
                                    • benborges
                                      benborges @Supaiku last edited by

                                      @Supaiku When I needed filesystems mount a few months ago (on top of sshfs mounts) I remember I struggled quite a bit to mount filesystems folders, but one thing worked :

                                      • Create /srv/YourFolder
                                      • Symlink that folder to the folder you want on the filesystem
                                      • mount that path inside Cloudron

                                      0cfe3d69-62a1-4038-b72e-23f19f86c9fd-image.png

                                      That's how I read SQLite files from other apps from say NocoDB or other cloudron apps.

                                      BenB

                                      robi Supaiku 2 Replies Last reply Reply Quote 2
                                      • robi
                                        robi @benborges last edited by

                                        @girish is this documented? app to app mounts?

                                        Life of Advanced Technology

                                        1 Reply Last reply Reply Quote 0
                                        • Supaiku
                                          Supaiku @benborges last edited by

                                          @benborges I did try that, but for some reason it wasn't working with the folders on other mounted drives.

                                          I just went with the mount point mounts on a new hard drive, but it is odd I couldn't get it to work.

                                          1 Reply Last reply Reply Quote 0
                                          • Supaiku
                                            Supaiku @girish last edited by Supaiku

                                            @girish 😥 could be - at least for the uid one, but not for the file one

                                            I just put another disk on that was fresh and used that with the filesystem mount.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB