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?

    • Offizieller Beitrag

    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.

    A similar question was posted on here but I don't know if there was an answer, and if you google this is a common request on how to delay a container start.

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

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


    https://www.kodinerds.net/inde…-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 Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    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:


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


    Entering the following:



    Bash
    #!/bin/sh
    
    
    Sleep 15
    docker stop plex
    sleep 10
    docker start plex
    sleep 3
    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"




    Code
    chmod a+x /usr/local/bin/plexcontainerrestart.sh

    The next step is creating the service-script:



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


    In nano put the following:



    Code
    [Unit]
    After=network.target
    
    
    [Service]
    ExecStart=/usr/local/bin/plexcontainerrestart.sh
    
    
    [Install]
    WantedBy=multi-user.target


    with ctrl+x and "Y" to save


    entering afterwards (line by line):


    Code
    chmod 664 /etc/systemd/system/plexcontainerrestart.service
    systemctl daemon-reload
    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 Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    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.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Wow! Thank you everyone for your help!


    I started off with @gderf's suggestion, and mapped the /media in the plex docker to the real filesystem path rather than the sharedfolder and it fixed the issue.


    Thanks again everyone!

  • 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.

    Hi, what do you really mean by this - I do not quite understand. Could you please shed some light on it? Thanks!
    Best.
    Fabian

    MoBo: Fujitsu D3417-B
    CPU: Intel Celeron G3900
    RAM: Samsung DDR4 - 8 GB ECC
    Case: Fractal Design Node 80
    HDD: SSD 64GB (System), 2*3TB+1*4TB (Data) + 1*4TB (Parity). UnionFS + Snapraid
    OMV 4
    Router: Fritzbox 7590

  • Instead of using an OMV defined Shared Folder, I use an absolute filesystem path such as /srv/dev-disk-by-label-d1/multimedia-content-d1/movies

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Instead of using an OMV defined Shared Folder, I use an absolute filesystem path such as /srv/dev-disk-by-label-d1/multimedia-content-d1/movies

    Ah - OK. I will check if I find my stuff there...probably it is not this simple because of using unionFS?
    Thanks.
    F.

    MoBo: Fujitsu D3417-B
    CPU: Intel Celeron G3900
    RAM: Samsung DDR4 - 8 GB ECC
    Case: Fractal Design Node 80
    HDD: SSD 64GB (System), 2*3TB+1*4TB (Data) + 1*4TB (Parity). UnionFS + Snapraid
    OMV 4
    Router: Fritzbox 7590

  • I use mergerfs configured by hand (not using the UnionFS plugin) and this doesn't complicate things. Just use the actual mountpoint.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!