OMV – Docker starting too fast…

Leave a comment

October 8, 2020 by aubreykloppers

If you find your docker files not attached to an image, giving you a random number instead of “release/release:latest” it is because your server is mounting disks slower than what docker starts up. To resolve this is quite easy:

Step 1 – find your mount from SH:

systemctl list-unit-files | grep ".mount"

This should give you output looking like this:

root@bigrage:~# systemctl list-unit-files | grep “.mount”
proc-sys-fs-binfmt_misc.automount static
-.mount generated
dev-hugepages.mount static
dev-mqueue.mount static
media-cdrom0.mount generated
proc-fs-nfsd.mount static
proc-sys-fs-binfmt_misc.mount static
run-rpc_pipefs.mount static
srv-dev\x2ddisk\x2dby\x2dlabel\x2d13TB.mount generated
sys-fs-fuse-connections.mount static
sys-kernel-config.mount static
sys-kernel-debug.mount static
tmp.mount enabled-runtime
nfs-mountd.service static
systemd-remount-fs.service static
umountfs.service masked
umountnfs.service masked
umountroot.service masked
umount.target static

What you are concerned with is the purple bit. Copy this and edit the following file with – Note: This is my disk, you have to use yours…:

systemctl edit docker.service

add the following using your mount info replacing the xxx:

[Unit]
Requires=xxx.mount
After=xxx.mount

example:

[Unit]
Requires=srv-dev\x2ddisk\x2dby\x2dlabel\x2d13TB.mount
After=srv-dev\x2ddisk\x2dby\x2dlabel\x2d13TB.mount

my disk is:  /srv/dev-disk-by-label-13TB so it looks like this:

[Unit]
Requires=srv-dev\x2ddisk\x2dby\x2dlabel\x2d13TB.mount
After=srv-dev\x2ddisk\x2dby\x2dlabel\x2d13TB.mount

That’s it. Reboot OMV and your docker images should be attached properly

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: