Filesystem Mount inside Container
-
-
@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.
-
@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-symAll host path does not exist...
-
@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
-
@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:
It is a EXT4 formatted disk, so I tried that one and got this:
Perhaps because it's already mounted?
I'll find an extra drive and hook it up and see if I can get it work with something fresh.
-
@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
That's how I read SQLite files from other apps from say NocoDB or other cloudron apps.
-