Some Updates overwrite /etc/docker/daemon.json

  • When I run updates to OMV7 I often have the /etc/docker/daemon.json overwritten which kills my jellyfin and tdarr dockers. It is easy enough to run #nvidia-ctk runtime configure --runtime=docker to fix it but a small bug. At this point I am not sure if it is OMV7 updates that over write the file or OMV-Extras. I will monitor and report what updates cause the issue as more updates happen. So far I can only verify that the last update was openmediavault and openmediavault-kvm. I have tried installing a plugin to see if it was a general thing with the --allow-downgrades flag with apt-get but it didn't overwrite the daemon.json.


    Last entry in /var/log/apt/history.log


    Start-Date: 2023-12-31 02:26:19

    Commandline: apt-get --yes --allow-downgrades --allow-change-held-packages --fix-broken --fix-missing --auto-remove --allow-unauthenticated --show-upgraded --option DPkg::Options::=--force-confold dist-upgrade

    Upgrade: openmediavault:amd64 (7.0-20, 7.0-21), openmediavault-kvm:amd64 (7.0.1, 7.0.2)

    End-Date: 2023-12-31 02:26:51

    Main-Srv: Xeon E5-2650 V4 32gb, OMV7 - 6.5.11-7-pve, Compose 7.0.3, Backup 7.0, Kernel 7.0.3, KVM 7.0.1, Resetperms 7.0, Sharerootfs 7.0-1, Wetty 7.0-1

    Mini-Srv: Intel N95 8gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    Inlaw's Srv: AMD A10-7800 16gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    • Offizieller Beitrag

    Check this guide. There are some useful settings about this. I think it should work on OMV7 as well.

    • Offizieller Beitrag

    When I run updates to OMV7 I often have the /etc/docker/daemon.json overwritten

    Does the hint for Docker -> Docker storage on the Settings tab not make sense?


    Install a kvm update did not cause this though. Any time you make a change in the Compose plugin in any tab, it will rewrite daemon.json unless you leave that field blank.

    omv 7.1.0-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    I think it would be positive to add this to the wiki. I haven't done it because I don't use Nvidia and I'm not sure how to write it.

    I would appreciate if someone can post in this same thread (or in a PM if you prefer) a text to include in the wiki that explains this in a simple way.

    • Offizieller Beitrag

    I think it would be positive to add this to the wiki. I haven't done it because I don't use Nvidia and I'm not sure how to write it.

    I would appreciate if someone can post in this same thread (or in a PM if you prefer) a text to include in the wiki that explains this in a simple way.

    Something like: "If you plan to customize docker and/or add settings to /etc/docker/daemon.json, leave the Docker storage field blank. This is very common for containers requiring nVidia hardware for transcoding/encoding."

    omv 7.1.0-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Something like: "If you plan to customize docker and/or add settings to /etc/docker/daemon.json, leave the Docker storage field blank. This is very common for containers requiring nVidia hardware for transcoding/encoding."

    If you want to install docker on another disk, what happens if you leave that field blank? Can you configure docker on another disk by setting the new path and once configured leave the field blank? Will that respect the non-default docker route?

  • Well look at that. An ID-10-T error. I’ve cleared that field and I’ll keep an eye on it.


    Thanks.


    There is a very good, recent guide for OMV6 in the guides section. Can we make a post to add this detail to the thread or should I write a new guide and include this tiny change?

    Main-Srv: Xeon E5-2650 V4 32gb, OMV7 - 6.5.11-7-pve, Compose 7.0.3, Backup 7.0, Kernel 7.0.3, KVM 7.0.1, Resetperms 7.0, Sharerootfs 7.0-1, Wetty 7.0-1

    Mini-Srv: Intel N95 8gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    Inlaw's Srv: AMD A10-7800 16gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    • Offizieller Beitrag

    There is a very good, recent guide for OMV6 in the guides section. Can we make a post to add this detail to the thread or should I write a new guide and include this tiny change?

    I assume you are referring to the guide I linked in post #2. I thought that guide already included this configuration. If not I'm sure chris_kmn will offer to fill in whatever is needed.

    • Offizieller Beitrag

    If you want to install docker on another disk, what happens if you leave that field blank?

    If you leave the field blank, you are responsible for maintaining everything in /etc/docker/daemon.json. The plugin literally only creates this:

    Code
    {
      "data-root": "/var/lib/docker"
    }

    If you want to maintain a custom daemon.json AND use a different disk, you need to put whatever path you want in data-root. In the nvidia thread, you will still see data-root in the daemon.json for nvidia

    Code
    {
        "runtimes": {
            "nvidia": {
                "path": "/usr/bin/nvidia-container-runtime",
                "runtimeArgs": []
            }
        },
        "default-runtime": "nvidia",
        "data-root": "/var/lib/docker"
    }


    Can you configure docker on another disk by setting the new path and once configured leave the field blank?

    I guess you could but it seems pretty simple to create the daemon.json yourself instead of relying on the plugin to create the initial one.

    Will that respect the non-default docker route?

    What do you mean by route?

    omv 7.1.0-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    If you leave the field blank, you are responsible for maintaining everything in /etc/docker/daemon.json. The plugin literally only creates this:

    This is starting to get complicated. That's why I haven't written all this on the wiki. If I don't experience it I won't understand it and that's why I ask for a text to publish. I hate writing something I haven't tried.

    What do you mean by route?

    I guess I wanted to say "path", Google translation error, sometimes it translates "route" and other times it translates "path". I think that in Spanish those two words are synonyms. I'll have to keep this in mind in the future if they have different meanings in English.

    • Offizieller Beitrag

    This is starting to get complicated. That's why I haven't written all this on the wiki. If I don't experience it I won't understand it and that's why I ask for a text to publish. I hate writing something I haven't tried.

    It shouldn't be complicated. You leave it blank if you want to write the daemon.json. You put a path in it if you want daemon.json to only contain data-root. noobs shouldn't be leaving it blank. If they are because they are following a guide, it is that guide's job to explain that they need to set data-root if they don't want the default /var/lib/docker.

    omv 7.1.0-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I assume you are referring to the guide I linked in post #2. I thought that guide already included this configuration. If not I'm sure chris_kmn will offer to fill in whatever is needed.

    I was referring to this guide;



    And it has 2 issues but I can’t add a post to help improve the guide. The first issue is the topic of this thread, the second issue is the most recent Tdarr builds require driver version 520 or higher and OMV6 ship with 470 so there is an extra step needed for Tdarr users to upgrade the base driver. OMV7 has 525 so doesn’t need the extra step. But the same 2 notes apply to the guide you posted as far as I can see. I love and hâte NVidia. Crazy fast and good transcoding but a PITA to get working well. My Intel and AMD transcode setups were way easier but much slower and the AMD was also much lower quality.

    Main-Srv: Xeon E5-2650 V4 32gb, OMV7 - 6.5.11-7-pve, Compose 7.0.3, Backup 7.0, Kernel 7.0.3, KVM 7.0.1, Resetperms 7.0, Sharerootfs 7.0-1, Wetty 7.0-1

    Mini-Srv: Intel N95 8gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    Inlaw's Srv: AMD A10-7800 16gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    • Offizieller Beitrag

    And it has 2 issues but I can’t add a post to help improve the guide.

    The threads in the guides subforum do not accept posts other than those of the author. You can quote the author here and he will see it when he enters the forum.

  • Issue seems to be resolve. The latest update to OMV7 did not clear my custom .json file. I will post again if I have any other issue but I doubt it.


    Thanks for the help.

    Main-Srv: Xeon E5-2650 V4 32gb, OMV7 - 6.5.11-7-pve, Compose 7.0.3, Backup 7.0, Kernel 7.0.3, KVM 7.0.1, Resetperms 7.0, Sharerootfs 7.0-1, Wetty 7.0-1

    Mini-Srv: Intel N95 8gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

    Inlaw's Srv: AMD A10-7800 16gb, OMV6 - 6.2.16-20-pve, Compose 6.11.3, Kernel 6.4.9, MergFS 6.3.8, Resetperms 6.0.3, Sharerootfs 6.0.3-1, Wetty 6.0.7-1

  • It shouldn't be complicated. You leave it blank if you want to write the daemon.json. You put a path in it if you want daemon.json to only contain data-root. noobs shouldn't be leaving it blank. If they are because they are following a guide, it is that guide's job to explain that they need to set data-root if they don't want the default /var/lib/docker.

    So far mine is blank because I am using a custom JSON for Nvidia, but I would love to move my docker folder out of the system drive, so now can I do that without being rewritten?

    Because it is still saying "Leave blank to use a custom /etc/docker/daemon.json"

    • Offizieller Beitrag

    So far mine is blank because I am using a custom JSON for Nvidia, but I would love to move my docker folder out of the system drive, so now can I do that without being rewritten?

    Because it is still saying "Leave blank to use a custom /etc/docker/daemon.json"

    The path to the "docker folder" is defined in daemon.json. It is called "data-root"

  • Well I did something bad, In order to make room I started to remove an old docker file (what I thought) from a non system disk, and I did not rename it.

    Now docker still running but portainer stays down I can still see the container, but they won't restart with error creating overlay2 mount to /var/lib/docker by the way var/lib/doker still have all the files in it specially overlay2!

    How can I fix the mess

  • If you want to maintain a custom daemon.json AND use a different disk, you need to put whatever path you want in data-root. In the nvidia thread, you will still see data-root in the daemon.json for nvidia

    Code
    {
        "runtimes": {
            "nvidia": {
                "path": "/usr/bin/nvidia-container-runtime",
                "runtimeArgs": []
            }
        },
        "default-runtime": "nvidia",
        "data-root": "/var/lib/docker"
    }

    Actually working perfect with the code of chris_kmn. Like I found out above just update the stacks in portainer don't even need to copy move the docker Folder


    Code
    {
        "data-root": "/srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/docker",
        "runtimes": {
            "nvidia": {
                "args": [],
                "path": "nvidia-container-runtime"
            }
        }
    }

Jetzt mitmachen!

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