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. Support
  3. Trying to add an sshfs mounted location as a regular file system volume type in Cloudron

Trying to add an sshfs mounted location as a regular file system volume type in Cloudron

Scheduled Pinned Locked Moved Solved Support
volumessshfs
19 Posts 7 Posters 446 Views 6 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.
  • M makemrproper

    Sounds like the case is identical, yes :).

    Great workaround! I will try it.

    Solving it at the hypervisor level is not any better than directly on the cloudron vm. There is no way to share a folder to a vm. Only nfs, cifs, sshfs or direct block device.

    The reason is that our phones are growing, and at current I need to sync 5x family members phones at 1tb. Not insane anounts of course, but way beyond the m2.ssd cloudron is running on.

    robiR Offline
    robiR Offline
    robi
    wrote last edited by
    #8

    @makemrproper said in Trying to add an sshfs mounted location as a regular file system volume type in Cloudron:

    or direct block device

    https://linbit.com/drbd/ is the gold standard.

    Conscious tech

    1 Reply Last reply
    0
    • M makemrproper

      Trying to add an sshfs mounted location as a regular filesystem volume type in Cloudron.

      I have a working SSHFS mount in /mnt/folder

      When trying to I am trying to add the /mnt/folder to Cloudron as a filesystem volume type, I am getting this error: hostPath must be a realpath without symlinks

      The reason I want to do this, is because Cloudron will not let me use an SSHFS volume as a data-volume for my (immich) Cloudron-app.

      debug:
      sshfs mount works perfectly
      permissions are lax, set to 777 on the mountpoint folder

      more background of why I want to do this here: https://forum.cloudron.io/topic/12239/storage-management-in-immich/46

      Thanks for any suggestions!

      andreasduerenA Offline
      andreasduerenA Offline
      andreasdueren
      wrote last edited by
      #9

      @makemrproper I'm sorry could you summarize or even give step-by-step instructions on what you ended up doing?

      1 Reply Last reply
      0
      • M makemrproper

        Trying to add an sshfs mounted location as a regular filesystem volume type in Cloudron.

        I have a working SSHFS mount in /mnt/folder

        When trying to I am trying to add the /mnt/folder to Cloudron as a filesystem volume type, I am getting this error: hostPath must be a realpath without symlinks

        The reason I want to do this, is because Cloudron will not let me use an SSHFS volume as a data-volume for my (immich) Cloudron-app.

        debug:
        sshfs mount works perfectly
        permissions are lax, set to 777 on the mountpoint folder

        more background of why I want to do this here: https://forum.cloudron.io/topic/12239/storage-management-in-immich/46

        Thanks for any suggestions!

        J Offline
        J Offline
        joseph
        Staff
        wrote last edited by
        #10

        @makemrproper said in Trying to add an sshfs mounted location as a regular file system volume type in Cloudron:

        When trying to I am trying to add the /mnt/folder to Cloudron as a filesystem volume type, I am getting this error: hostPath must be a realpath without symlinks

        Just tested this and this works fine here. Is /mnt/folder a symlink? I have a fstab line to mount a sshfs into /mnt/folder . And then I just added Filesystem mount type in Volumes view.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          msbt
          App Dev
          wrote last edited by msbt
          #11

          Also getting that message, but on a different use-case. I'm trying to add a (sftp) rclone mount to Cloudron. Mounting and browsing works fine, but when trying to add it as a volume, it says hostPath must be a realpath without symlinks. Is that not supported?

          1 Reply Last reply
          0
          • J Offline
            J Offline
            joseph
            Staff
            wrote last edited by
            #12

            Didn't get an answer to my earlier question. Is it a symlink? You can't add symlinks.

            Can you try node -e "fs.realpathSync('/the/path')" ? This function is failing or returning something other than the path you are adding for some reason.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              msbt
              App Dev
              wrote last edited by
              #13

              Can only speak for my issue, not a symlink:

              /mnt# ls -la
              total 12
              drwxr-xr-x  4 root root 4096 Jun  9 09:21 .
              drwxr-xr-x 23 root root 4096 Dec 17 11:10 ..
              drwxr-xr-x  1 root root    0 Jun  9 09:22 media
              drwxr-xr-x  2 root root 4096 Dec 17 11:31 volumes
              

              Your command doesn't fail, but doesn't give any output either.

              J 1 Reply Last reply
              0
              • M msbt

                Can only speak for my issue, not a symlink:

                /mnt# ls -la
                total 12
                drwxr-xr-x  4 root root 4096 Jun  9 09:21 .
                drwxr-xr-x 23 root root 4096 Dec 17 11:10 ..
                drwxr-xr-x  1 root root    0 Jun  9 09:22 media
                drwxr-xr-x  2 root root 4096 Dec 17 11:31 volumes
                

                Your command doesn't fail, but doesn't give any output either.

                J Offline
                J Offline
                joseph
                Staff
                wrote last edited by
                #14

                @msbt said in Trying to add an sshfs mounted location as a regular file system volume type in Cloudron:

                Your command doesn't fail, but doesn't give any output either.

                My bad... Can you try like this:

                root@my:/mnt# node -e "console.log(fs.realpathSync('/mnt/folder'))"
                /mnt/folder
                
                M 1 Reply Last reply
                0
                • J joseph

                  @msbt said in Trying to add an sshfs mounted location as a regular file system volume type in Cloudron:

                  Your command doesn't fail, but doesn't give any output either.

                  My bad... Can you try like this:

                  root@my:/mnt# node -e "console.log(fs.realpathSync('/mnt/folder'))"
                  /mnt/folder
                  
                  M Offline
                  M Offline
                  msbt
                  App Dev
                  wrote last edited by
                  #15

                  @joseph sure:

                  /mnt# node -e "console.log(fs.realpathSync('/mnt/media'))"
                  /mnt/media
                  
                  J 1 Reply Last reply
                  0
                  • M msbt

                    @joseph sure:

                    /mnt# node -e "console.log(fs.realpathSync('/mnt/media'))"
                    /mnt/media
                    
                    J Offline
                    J Offline
                    joseph
                    Staff
                    wrote last edited by joseph
                    #16

                    @msbt you are trying to add /mnt/media in the Volumes view ? I cannot see why https://git.cloudron.io/platform/box/-/blob/master/src/volumes.js?ref_type=heads#L57 will fail . That's where the error message comes from. If you are ok debugging a bit, just put some console.log in that function and systemctl restart box.

                    M 1 Reply Last reply
                    0
                    • J joseph

                      @msbt you are trying to add /mnt/media in the Volumes view ? I cannot see why https://git.cloudron.io/platform/box/-/blob/master/src/volumes.js?ref_type=heads#L57 will fail . That's where the error message comes from. If you are ok debugging a bit, just put some console.log in that function and systemctl restart box.

                      M Offline
                      M Offline
                      msbt
                      App Dev
                      wrote last edited by
                      #17

                      @joseph happy to, can you maybe enable chat so we can do that 1:1?

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        joseph
                        Staff
                        wrote last edited by
                        #18

                        @msbt can you instead write to me at support@cloudron.io please? Will debug it right away.

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          msbt
                          App Dev
                          wrote last edited by msbt
                          #19

                          My issue is resolved, adding a --allow-other parameter to the mount solved it, thanks @girish and @joseph

                          1 Reply Last reply
                          3
                          • J joseph has marked this topic as solved
                          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