Plex not accessing shared folder after restart

    • OMV 4.x
    • Plex not accessing shared folder after restart

      I'm running into a peculiar problem after I restart my OMV server.

      Currently, I have a mergerfs pool of 2 8tb and a 4tb drives with my media on it. If I add the pool as shared folder (/media) and pass it into the plex docker container, plex can see the /media/movies and /media/tv folders and the movie and tv contents of these folders.

      However, if I restart my server, Plex sees the /media/movies and /media/tv folders as empty. A fix that I implemented was by removing and adding /media as a shared folder, and restarting the plex docker container, but I'd rather not have to do this every time I restart the server, or if I lose power.

      My intuition is that the plex docker container is starting before mergerfs is able to do its thing, which is why the folders are showing up empty.

      Any ideas?
    • Plex not accessing shared folder after restart

      You can do it with a normal script, like I do.

      kodinerds.net/index.php/Thread…-Module-ent-laden-CineS2/

      On the second page of the thread (in German) you can find the script I’m using. Only thing is that you have to enter the name of the Plex container.

      I’m on the way and therefore I can’t post the exact way how to do. With mobile and Tapatalk it’s not so good to write everything down


      Gesendet von iPhone mit Tapatalk
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware

      OMV-Server-SW: Debian Stretch with backports-Kernel (always up-to-date), OMV v4 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.2.x), Docker with PlexMediaServer, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • @kronos

      what you can do is the following. Connect to your server via ssh/telnet/putty and enter the following:

      Source Code

      1. nano /usr/local/bin/plexcontainerrestart.sh


      Entering the following:


      Shell-Script

      1. #!/bin/sh
      2. Sleep 15
      3. docker stop plex
      4. sleep 10
      5. docker start plex
      6. sleep 3
      7. exit 0

      Replace plex with your real plex container name NOT the name of the plex server. The name you created the container.

      leave and save with ctrl+x and "Y"



      Source Code

      1. chmod a+x /usr/local/bin/plexcontainerrestart.sh
      The next step is creating the service-script:


      Source Code

      1. nano /etc/systemd/system/plexcontainerrestart.service


      In nano put the following:


      Source Code

      1. [Unit]
      2. After=network.target
      3. [Service]
      4. ExecStart=/usr/local/bin/plexcontainerrestart.sh
      5. [Install]
      6. WantedBy=multi-user.target

      with ctrl+x and "Y" to save

      entering afterwards (line by line):

      Source Code

      1. chmod 664 /etc/systemd/system/plexcontainerrestart.service
      2. systemctl daemon-reload
      3. systemctl enable /etc/systemd/system/plexcontainerrestart.service

      now you are done and reboot (important) the server that the measures take affect. After reboot you should see that everything is working as expected. If not try to increase the seconds (after sleep command).
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware

      OMV-Server-SW: Debian Stretch with backports-Kernel (always up-to-date), OMV v4 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.2.x), Docker with PlexMediaServer, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • I suggest not using OMV sharedfolders as Volume and Bind Mount targets within dockers. There is no need to do this and it just adds another layer of complexity. Use the absolute real filesystem paths instead.

      I run a five drive mergerfs pool for my Plex media and run Plex in a docker. I don't have any problems with it.
      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380