2

I have an example setup:

overlay /data/all overlay noauto,x-systemd.automount,lowerdir=/data/local:/data/remote 0 0
//myhomeserver/data /data/remote cifs iocharset=utf8,ro,credentials=/data/remote.credentials 0 0

Now, problems arise when myhomeserver can't be reached. Most cases, connection drops, comes back online, but /data/all no longer works (hangs), df hangs a bit and in the end it outputs a classic CIFS-related myhomeserver: Host is down message.

How to handle this in the most graceful way possible with current tech? I'm on latest stable Debian for both servers. Data is always accessed through overlayfs /data/all. I would require something like:

  • /data/all overlayfs should never hang or at least do it minimally and recover
  • /data/all should expose available data from /data/local no matter the state of /data/remove
  • /data/remote should be available best-effort, that is, recover automatically after a downtime, and upon recovery, /data/all should again expose its contents

I think that systemd could somewhat help but don't know how I would use it properly in such a setup, can't find any examples. Maybe autofs could also help? Never used that though..

jazzman
  • 21

0 Answers0