Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

OMV enters emergency mode if mounting of /var/lib/docker/openmediavault fails #72

Open
denis-martin opened this issue Jul 22, 2018 · 7 comments

Comments

@denis-martin
Copy link

If the following fstab entry cannot be mount during boot, OMV enters emergency mode:

/srv/dev-disk-by-label-Data1/Docker /var/lib/docker/openmediavault none bind,defaults 0 0

This can happen, for instance, if the data disk is encrypted and needs to be unlocked manually. The emergency mode even prevents ssh from being started, which is especially painful in headless mode.

The data disk has the nofail option. If adding the nofail option to the docker mount point, the system starts gracefully. My fstab for the data disk and the docker mount points:

# >>> [openmediavault]
/dev/disk/by-label/Data1 /srv/dev-disk-by-label-Data1 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
/srv/dev-disk-by-label-Data1/Docker /var/lib/docker/openmediavault none bind,defaults,nofail 0 0
# <<< [openmediavault]

Note the nofail option on the docker mount point.

Not sure if openmediavault-docker-gui is the package responsible for this fstab entry, so please redirect me if I'm wrong here ;-)

@ryecoaaron
Copy link
Member

What version of OMV? The latest OMV 4.x version doesn't use an fstab entry.

@denis-martin
Copy link
Author

It's

  • OMV 4.1.8.2-1 (Arrakis)
  • openmediavault-docker-gui 4.0.1

Since what OVM 4.x version the usage of fstab has been removed?

@ryecoaaron
Copy link
Member

Not sure but the removal code didn't seem to work on your system. I found the commit where the removal code was moved to a different location but it has been in the plugin longer than that - 5b61641

@denis-martin
Copy link
Author

So... if understand the snippets correctly, there is some DB in OMV which manages the fstab entries. Is there a way to query the mount points which are registered in OMV?

If the docker bind mount is no longer in the DB, there was maybe just a missing trigger to rewrite the fstab entries.

I could probably just create a new mount in OMV and see what happens to the fstab entries. But I'm reluctant to do that while I do not have physical access to the device ;-)

@ryecoaaron
Copy link
Member

omv-showkey mntent will show you the entries.
omv-mkconf fstab will rewrite the omv entries in your /etc/fstab but this should happen on reboots.

@denis-martin
Copy link
Author

This still shows the entry:

      <mntent>
        <uuid>aa92d4d7-c56f-4fb2-86c5-f11e0bf03789</uuid>
        <fsname>/dev/disk/by-label/Data1</fsname>
        <dir>/srv/dev-disk-by-label-Data1</dir>
        <type>ext4</type>
        <opts>defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl</opts>
        <freq>0</freq>
        <passno>2</passno>
        <hidden>0</hidden>
      </mntent>
      <mntent>
        <uuid>965985e2-34fe-4745-8efc-2687b41fe830</uuid>
        <fsname>/srv/dev-disk-by-label-Data1/Docker</fsname>
        <dir>/var/lib/docker/openmediavault</dir>
        <type>none</type>
        <opts>bind,defaults</opts>
        <freq>0</freq>
        <passno>0</passno>
        <hidden>0</hidden>
      </mntent>

I actually installed omv-docker-gui quite recently. I'm not 100% sure, but it could very well be that docker-gui v4.0.1 was a fresh install.

@subzero79
Copy link

The docker plugin package with those changes is not yet available in the repositories.
If you want you can build it from source and install it manually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants