Kinda fudged things up with Docker/RAID. Looking for some advice on the best way to fix it!

  • Hi everyone, new to the forums! I've been using OMV for awhile now ever since moving from Ubuntu Server. I've been liking it so far, but I have had my fair share of little snags here and there as I get used to everything. I've currently got OMV 5 installed using the Promox kernel. I've got 2x10TB drives for all of my movies, music, etc. configured in RAID through just the vanilla software raid solution OMV offers. Likewise I have 2x1TB drives configured also in raid for just my docker containers.


    Along the way, I kind of missed a few things with how I should have been configuring my system. I have Docker installed through OMV-Extras and pointed it to use the raid 1TB drives as /var/lib/docker using symlinks. What I didn't know I wasn't supposed to do was also use this directory to store my persistence data and volumes for my containers. I have about 12 containers running right now ranging from minecraft servers to the usual jackett/sonarr/radarr/plex combo that most other people use. For the most part, I've yet to run into any significant issues mounting things and fetching files from volumes, but I was in the process of installing a container for a Discord bot when I realized I had some things messed up.


    The bot has a script that requires it make some changes to it's own docker configuration. No matter how I ran it (user flags, privileged, UUID/PGID combos, etc.) I could not run it for more than a few seconds since it would error out "permission denied" once it hit the part where it was supposed to add some things to it's own config. Through troubleshooting back and fourth with the project's maintainer I realized the problems were on my end since I had the container's data pointing to "/var/lib/docker/discordbot" (which itself was really pointing to /srv/dev-disk-by-label-DOCKER/containers"). When I re-created the container but ran it from a normal user's /home folder I was able to run the bot without issues at all. It was able to modify what it needed to modify and run flawlessly.


    So in learning all of that, I realize now that even though I haven't had issues with other containers up until now, I probably shouldn't be storing all of my data under /var/lib/docker. I tried to create a new folder under my user's /home/ directory titled DOCKER, but realized this was a moot point since it would be occupying space on my SSD that OMV is installed on, not on the 1TB raid drive I made solely for docker data. I tried to make a new folder on the docker drive and mount it to my user's home directory but I ran into permissions issues again. My hunch as to why that is is I think my raid drives are either mounted in a way or configured in a way that "root" is the owner of said drive. As such, running some containers from that drive as it currently is results in the permissions errors again.


    All of that being said, I am looking for some advice on how to kind of fix all of this cleanly. My objective is to either reconfigure or remount my 1TB docker raid in a way that all my users and containers can access it properly and in a way that isn't unsafe for my Docker install. Ideally, I'd like to uninstall docker, purge the /var/lib/docker folder and it's symlink and then start anew with the docker config still being in /var/lib/docker on my SSD but all of the container persistence being on my raid under an /appdata/ folder or something along those lines. My biggest worry is how I have the raid configured though. I don't know if doing all of that will even fix anything if my docker drive isn't going to be properly accessible by the right containers.


    Sorry if any of this is a little confusing, I am still quite new to all of this. If there's any info I didn't provide please let me know! I appreciate anyone's help in advance. Thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!