Docker containers can't see shared folders and sometimes dissapearing.

    • Docker containers can't see shared folders and sometimes dissapearing.

      Hello, Im pretty new to all this but I've been following tutorial videos and threads to setup my OMV server. I'm having some issues with docker though and I'm not sure if I'm doing something wrong or there is an issue with my install.

      For simplicity I setup my shared folders to be read and write for everyone. I've tried setting up dockers for plex and emby, but for some reason they cannot see my shared folders. I've followed tutorials from Technodad Life on installing and it goes just fine. Once I have the docker running, I try to set the media folders in plex or emby and I cannot see my shared folders which is where my media is located.

      Another issue I'm facing is anytime I try to edit a docker I get and error upon saving. Then the docker container just dissapears and I have to set it up all over again. I know I had done this before and was able to edit. But this happens to every single docker image I try to run. They just vanish if I edit or stop running them.

      I currently have a tranmission with OpenVPN docker and nextcloud docker up and they seem to be running properly. If I were to try and edit them they will dissapear though.
    • Most likely explanation for your troubles is that the user the containers run as does not have adequate permissions to access the shared folders and/or the the actual file systems directories on the disks. Check these very carefully.

      Be advised that setting Privileges and/or ACLs in the OMV Shared Folders panel is not the same thing as setting file system permissions. And it's the latter that are vitally important.

      I never make any Privileges and/or ACL settings in the OMV Shared Folders panel.

      The easiest way to avoid problems like this is to NOT use Shared Folders in docker Volume and bind mount settings. Use the actual filesystem locations instead, but only after you are sure the permissions on those filesystem locations are correct.
      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • gderf wrote:

      The easiest way to avoid problems like this is to NOT use Shared Folders in docker Volume and bind mount settings
      I use Emby and I never pointed emby:docker to shared folders, set those up within Emby itself, I'm guessing it's the same for Plex.

      But I do know the emby:docker install sets those to be set up in Volumes and Bind mounts within the container.
      Raid is not a backup! Would you go skydiving without a parachute?
    • You do not want any Plex Volumes and Bind mounts created within the container.

      For Plex running in a docker you need to setup the Volumes and Bind mounts external to the container yourself, and from within the Plex interface you have to configure your media locations as the Container paths when you define your Librarys.
      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • gderf wrote:

      Most likely explanation for your troubles is that the user the containers run as does not have adequate permissions to access the shared folders and/or the the actual file systems directories on the disks. Check these very carefully.

      Be advised that setting Privileges and/or ACLs in the OMV Shared Folders panel is not the same thing as setting file system permissions. And it's the latter that are vitally important.

      I never make any Privileges and/or ACL settings in the OMV Shared Folders panel.

      The easiest way to avoid problems like this is to NOT use Shared Folders in docker Volume and bind mount settings. Use the actual filesystem locations instead, but only after you are sure the permissions on those filesystem locations are correct.
      Alright, so how can I check/change file system permissions for the shared folders? The way I have it setup, which is the same as in the tutorial videos, is this:

      Run docker, set PUID and GUID
      Set /config under /sharedfolders/Appdata/plex
      Set /data under the same
      There is not /library setting which I think was shown in the video

      Then I open plex and add a library, look for folder location. I see everthing like /root, /usr, /etc, whatever else, but no /sharedfolders. So the docker is using the appdata shared folder but the plex application itself cant even see /sharedfolders.

      So does this still sound like a filesystem permissions issue?

      Also, what exactly do you mean by not using shared folders but instead filesystem location? Do you mean set it to /appdata instead of /sharedfolders/appdata, so I would be making a new folder in the main directly instead of as a shared folder?

      Sorry if I sound dumb but I want to actually understand what is wrong and how to fix it. Like I said Im pretty new so I may need more in depth explanation to understand if you are willing. Thanks!
    • First, are PUID and GUID a real user and group on your machine?

      You set /config to /sharedfolders/Appdata/plex but where is /sharedfolders/Appdata/plex on your system? What is the real physical directory? Does the user you specified in PUID have read and write permissions on that directory?

      Yes, that's what I mean by not using shared folders.

      The top two causes of docker problems around here are incorrect networking specifications for the container and incorrect filesystem ownership and permissions on the filesystem outside the container.

      Networking problems are almost completely avoided by running containers in Host networking mode which almost always just works all by itself. Running a Bridged networking connection means you set the entire thing up by hand where every thing you specify might be a mistake or might introduce an incompatibility.

      Not much can be said about filesystem ownership and permissions other than they must be correct or the container will not be able to communicate with the disk(s) in the machine.

      A more subtle problem has to do with relativity. When you specify directorys and files within a program running inside the container, all those references must be on and along the Container paths, not the absolute filesystem locations outside the container.

      When you tried to add a Library in Plex and went looking for the /sharedfolders but didn't see it, the reason is that the container is running as a user that does not have read permission on either the sharedfolder or the directory referenced by the shared folder.
      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • gderf wrote:

      First, are PUID and GUID a real user and group on your machine?

      You set /config to /sharedfolders/Appdata/plex but where is /sharedfolders/Appdata/plex on your system? What is the real physical directory? Does the user you specified in PUID have read and write permissions on that directory?

      Yes, that's what I mean by not using shared folders.

      The top two causes of docker problems around here are incorrect networking specifications for the container and incorrect filesystem ownership and permissions on the filesystem outside the container.

      Networking problems are almost completely avoided by running containers in Host networking mode which almost always just works all by itself. Running a Bridged networking connection means you set the entire thing up by hand where every thing you specify might be a mistake or might introduce an incompatibility.

      Not much can be said about filesystem ownership and permissions other than they must be correct or the container will not be able to communicate with the disk(s) in the machine.

      A more subtle problem has to do with relativity. When you specify directorys and files within a program running inside the container, all those references must be on and along the Container paths, not the absolute filesystem locations outside the container.

      When you tried to add a Library in Plex and went looking for the /sharedfolders but didn't see it, the reason is that the container is running as a user that does not have read permission on either the sharedfolder or the directory referenced by the shared folder.
      Yes the PUID and GUID are 1000 and 100 which is the id of "user1" that I created.

      I'm a little bit confused about the real physical directory. When I SSH into the server and view the file system, /sharedfolders is a directory on the main screen. When I go to it, it contains all of my shared folders and files. Isn't that the actual directory or is it somehow located somewhere else and just referenced? I don't see any of the content/folders anywhere else in the filesystem.
    • New

      gderf wrote:

      Are you saying you have no idea where you stored all the media files you wish to serve with Plex?

      Did your media files exist on any of your hard drives before you created any shared folders?
      I know they are stored in /sharedfolders/media/Videos. That is the only place I can find them.

      I added the media to my drives through SMB from a Windows machine. So I had already setup the shared folders and then added the media. So the answer to your question is no.
    • New

      Start looking in /srv

      This is one of the reasons I don't use /sharedfolders in docker volume and bind mounts. If you don't know where the files and directoryies really are, you can't determine their ownership and permissions. And if those are wrong, you aren't going to get anywhere.
      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • New

      gderf wrote:

      Start looking in /srv

      This is one of the reasons I don't use /sharedfolders in docker volume and bind mounts. If you don't know where the files and directoryies really are, you can't determine their ownership and permissions. And if those are wrong, you aren't going to get anywhere.
      Oh wow it was right there in /srv! I can't believe I missed that. Thank you so much for all your help! I actually got Plex and Emby dockers to access my media.

      For future reference, how should my media be stored? I would assume /media is a good spot for it and then add it as a shared folder afterwards?