Jump to content

How do I guarantee SSHFS mount runs before docker service engine starts?

1 post in this topic Last Reply

Recommended Posts

Posted (edited)

I want to mount a drive using SSHFS for a remote share on another machine.  I had it at /mnt/user/remote to start with, but then found my docker containers couldn't see this. After some digging, I found that containers cannot see any new mount points created after the docker service is started.  


While I can stop and restart the docker service, I'll encounter problems when I reboot the server unless I can guarantee the SSHFS mount happens BEFORE the docker service begins.  So this begs 2 questions:


  1. How do I ensure that SSHFS mount happens before the docker service starts on boot? I couldn't find a good answer despite a bunch of searching.
  2. Is it a good idea to mount using SSHFS within /mnt/user? Or should i be putting it somewhere else like directly on a disk? (e.g. /mnt/disk1)
  3. Lastly, I noticed that if my remote machine isn't available, the logs threw all sorts of errors and seems like the machine was getting hung. Not sure if this is just expected or a side-effect of me mounting it within /mnt/user
Edited by tmchow

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.