Bind to sshfs mount with 'reconnect' flag
Starting a shell with --bind option pointing to an sshfs mounted volume works ok. However, if the sshfs mount gets dropped and restarted automatically (with the sshfs 'reconnect' option) while the shell is running it can no longer see the mounted volume. Is there any way to 'refresh' the binding from within the shell?
There isn't a direct way to do this. The reconnected FUSE mount is a different mount... and can't be passed into the container again in any simple manner. I believe that the way to work around this issue is by mounting a path above the FUSE mount, and ensuring mount options are set so that mounts and changes under that directory (i.e. new FUSE re-connections) propagate.
-
Don't bind mount the FUSE sshfs directory directly. Mount sshfs inside a directory e.g.
/mydir/sshfsand then bind mount/mydir. -
Ensure that
mount slaveis true insingularity.conf.
I would also suggest possibly trying the --fusemount option so that the fuse process runs in the container, rather than binding it in.
https://sylabs.io/guides/3.9/user-guide/bind_paths_and_mounts.html?highlight=fuse#fuse-mounts
I can't say I've tried FUSE mounts which drop out like this, but it's another path to investigate.
Closing as there has been no follow-up regarding the suggested approach. Please feel free to re-open if you have further information r.e. the above.