Creating shared folders and other folders in OMV, Docker and Portainer

  • I have a Raspberry Pi 4 which is running Pi OS Lite (OMV 6.0.


    I am in the process of setting up a Plex media server using Docker and Portainer.


    At some point I need to set up, in OMV, a shared folder called Containers on the USB 3.0 SSD.


    When using Portainer and the Plex image called Linuxserver/plex I am asked to set up several folders, such as config, transcode, tv and movies etc.


    I am thinking of the following folder structure


    Containers

    ......config

    ............plex

    ......plex

    ...........tv

    ...........movies

    ............transcode


    Is this OK?


    I am very unsure about the location of the config and transcode folders. To be honest I am not very sure about the whole process - its a steep learning curve!

    Sytem: Raspberry Pi 5 running off NVMe memory added via the PCIe slot and with a 1 TB external USB 3.0 NVMe drive.. The OS is Pi 64 bit Lite and I have the latest OMV installed. I am using this setup mainly as a hobby but also as a media server. I am very new to OMV

    • Offizieller Beitrag

    For linuxserver/plex you don't need a transcode folder anymore.

    From https://hub.docker.com/r/linuxserver/plex

    Zitat


    04.12.19: - Add variable for setting PLEX_CLAIM. Remove /transcode volume mapping as it is now set via plex gui and defaults to a location under /config.

    Otherwise you should be good.


    Suggest to use the docker-compose from here in Portainer.

    • Offizieller Beitrag

    After almost three years with OMV I have recently come to take up a minimalist approach to shared folders. I started out making every media folder - movies, photos, tv, etc., etc. a shared folder, and then mapping each one in my Plex yml. Now I only include one volume path for media and set up the folders from within Plex. Like this:

    Code
    volumes:
      -/srv/dev-disk-by……/media:/media
      -/srv/dev-disk-by……/appdata/plex:/config

    My main server only has four shared folders: appdata, data, media, and nextcloud. You could easily have just two shared folders: appdata and data. Appdata can contain all your containers’ config folders, and the data folder can contain all the “media” folders, documents, downloads, etc.


    The takeaway of all this rambling is there is no logical reason to make every folder you create a shared folder. For one thing, it makes your Plex yml much shorter.

    • Offizieller Beitrag

    Same here (been doing it that way for a while)...


    I have 5 shares...


    AppData (for my /config folders)

    Home (for home directories)

    Torrents (that's where torrents get downloaded

    Disk_# (where everything else is)

    docker (where container data is stored)


    Then usually at CLI, I make a Data and Media directory under Disk_#. After I set up my symlinks under "/NAS" I literally have every path I need for a stack/compose file memorized and don't really need to look at them.


    Only one of those folders I need shared over the network is Disk_#.. so that I share that folder over nfs.

    • Offizieller Beitrag

    After I set up my symlinks under "/NAS" I literally have every path I need for a stack/compose file memorized and don't really need to look at them.

    Same here. I create a folder “/sym” and then create a symlink for each disk so that I can easily remember volume paths in compose:

    Code
    /sym/disk1/appdata
    /sym/disk1/media
    /sym/disk2/rsnapshot-backup
    /sym/disk1/rsnapshot-source

    And when naming folders I always stick with lower case so I don’t accidentally wind up with “Appdata” and “appdata” and can’t figure out why my container doesn’t work right.

    • Offizieller Beitrag

    Same here. I create a folder “/sym” and then create a symlink for each disk so that I can easily remember volume paths in compose:

    Code
    /sym/disk1/appdata
    /sym/disk1/media
    /sym/disk2/rsnapshot-backup
    /sym/disk1/rsnapshot-source

    And when naming folders I always stick with lower case so I don’t accidentally wind up with “Appdata” and “appdata” and can’t figure out why my container doesn’t work right.

    Yep... I tell people all the time with this there is no right or wrong way, so long as you are consistent.

  • Thanks a lot for all the help.


    Sorry I have taken so long to reply but I have been very busy, on holiday and then caring for a wife with covid-19


    I now have a better idea about folder structure but I am still confused about how the paths to the folders are defined under Volumes in Portainer. However, as a complete noobie, I find it rather confusing to be given all instructions for OMV 5 when UI am using OMV 6. It not so easy, to me anyway!, how to find the relevant sections in OMV 6 when every instruction refers to OMV5. However I will persevere and i will get there in the end.


    I now believe that the paths the the relevant plex folders are relative paths but relative to what!


    Lets assume that I have a drive sda which is separate from the drive containing the Pi OS and OMV etc. The drive sda has the file system sda1.


    On this disk I have created folders appdata and data, the latter being shared).


    In data I have created a folders called plex

    In plex I have created folders called tv, movies, videos, movies etc

    Where do I create config? In a sub folder in appdata or in data?


    What defines the base drive or folder for the relative paths and how do I enter this information to container called plex?


    What is the relative path to movies?

    Is it just /data/plex/movies? If not where will I find the required path?


    As you can see I have a long way to go before really understanding this process.


    Cheers

    Sytem: Raspberry Pi 5 running off NVMe memory added via the PCIe slot and with a 1 TB external USB 3.0 NVMe drive.. The OS is Pi 64 bit Lite and I have the latest OMV installed. I am using this setup mainly as a hobby but also as a media server. I am very new to OMV

  • I think, you are missing something. Let's start at the very beginning. In contrast to windows linux does only have one tree spanning all disks (partitions to be precise). The root disk starts at / and OMV mounts disks into mountpoints (directories for special purpose) in /srv/dev-disk-by-...


    So in the end you probably created data and appdata somewhere in /srv/dev-disk-by-...


    The separation between appdata and data is purely conceptual and by no means enforced. The idea behind this is that there is some data you care about (data like media, tv, ...) and some data you do not care to much about (data like persistent configuration inside the containers aka appdata).


    media, tv, movies, ... are usually used as shared folders, so users can access the data, config does not need to be shared.


    So you probably want


    /srv/dev-disk-by-.../data/media

    /srv/dev-disk-by-.../data/tv

    /srv/dev-disk-by-.../data/movies


    and


    /srv/dev-disk-by-.../appdata/plex/config

    /srv/dev-disk-by-.../appdata/<some_other_container>/config


    All pathes in portainer have to be absolute.



    The documentation of the image will tell you what volumes you can use and whre to place them inside the container.

    It is much easier to use docker-compos.yml files (stacks in portianer), as you can post them here and we can help to edit these files.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    • Offizieller Beitrag

    I personally put any config directory, under appdata. That is all I put there.

  • Thanks


    I now have a better understanding and hopefully I will now be more successful with my next attempt.


    Zoki quoted "It is much easier to use docker-compos.yml files (stacks in portianer), as you can post them here and we can help to edit these files"


    My next question is how and why should I use stacks? I would appreciate being directed to a useful source of information on this topic. I will start by using Google.

    Sytem: Raspberry Pi 5 running off NVMe memory added via the PCIe slot and with a 1 TB external USB 3.0 NVMe drive.. The OS is Pi 64 bit Lite and I have the latest OMV installed. I am using this setup mainly as a hobby but also as a media server. I am very new to OMV

  • Google docker-compose. Only pertained calls it stack.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    • Offizieller Beitrag

    My next question is how and why should I use stacks?

    As Zoki said its called stacks in Portainer and docker-compose.yml if you are using it in the command line.


    A docker compose file contains a set of instructions that happens to be relatively easy to read by a non coder, that tells docker how to compile the container. If you have a problem and you post that docker compose file on this forum just about anybody who has created a container using docker compose can easily see where the problem is and thus help you build a successful container.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • Thanks.


    I am a bit overwhelmed buy the rate of input of new concepts to me.


    My 83 year old brain is getting a little slow to accept new concepts.

    Sytem: Raspberry Pi 5 running off NVMe memory added via the PCIe slot and with a 1 TB external USB 3.0 NVMe drive.. The OS is Pi 64 bit Lite and I have the latest OMV installed. I am using this setup mainly as a hobby but also as a media server. I am very new to OMV

Jetzt mitmachen!

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