How to unbind/rebind paths over sshfs without disconnect/reconnecting the network?
I mounted a sshfs directory, then binded directories within that.
If I unbind the binded mount points and then try to rebind them, they fails to rebind.
However, if I disconnect the network, and reconnect, the rebinding will then again work.
Code:
# shorting down the script, here's what I'm doing...
# mount the main sshfs directory
sudo sshfs -p "$RPORT" -o follow_symlinks -o allow_other -o IdentityFile="$RSAKEY" -o reconnect "$RFSUSER@$url:/" "$MAINMOUNTPOINT"
# bind the subdirectory
sudo bindfs "$MAINMOUNTPOINT/media/$drive" "/media/$drive"
# unmount the subdirectory bind, etc...
sudo umount "/media/$drive"; sudo umount "$MAINMOUNTPOINT" # followed by the sshfs command above
# try to rebind it again... fails to rebind, no error message
sudo bindfs "$MAINMOUNTPOINT/media/$drive" "/media/$drive"
# disconnect then reconnect the network, and try again... command succeeds