From ea1a80ef86f04b023b135214011ac0f1cad940f0 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Thu, 28 Jul 2016 17:32:54 -0400 Subject: [PATCH 1/2] README: fix examples to specify to use sshfs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b37e12..f21b524 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ An example snippet from a `Vagrantfile`: config.vm.synced_folder "/path/on/host", "/path/on/guest", ssh_opts_append: "-o Compression=yes -o CompressionLevel=5", sshfs_opts_append: "-o auto_cache -o cache_timeout=115200", - disabled: false + disabled: false, type: "sshfs" ``` ### Options Specific to Arbitrary Host Mounting @@ -169,7 +169,7 @@ config.vm.synced_folder "/path/on/host", "/path/on/guest", ssh_host: "somehost.com", ssh_username: "fedora", ssh_opts_append: "-o Compression=yes -o CompressionLevel=5", sshfs_opts_append: "-o auto_cache -o cache_timeout=115200", - disabled: false + disabled: false, type: "sshfs" ``` ### Options Specific to Reverse Mounting (Guest->Host Mount) From 900c627b1772242178d2571c8357d1af78e4eec1 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Thu, 28 Jul 2016 17:35:00 -0400 Subject: [PATCH 2/2] README: add a FAQ - first entry about sshfs caching Fixes #18. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index f21b524..1aca233 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,29 @@ on the guest into `/guest/data` on the host: config.vm.synced_folder "/guest/data", "/data", type: 'sshfs', reverse: true ``` +## FAQ + +Here are some answers to some frequently asked questions: + +### Why do new files take time to appear inside the guest? + +Sometimes it can take time for files to appear on the other end of the +sshfs mount. An example would be I create a file on my host system and +then it doesn't show up inside the guest mount for 10 to 20 seconds. +This is because of caching that SSHFS does to improve performance. +Performance vs accuracy is always going to be a trade-off. If you'd +like to disable caching completely you can disable caching completely +by appending the `cache=no` SSHFS option to the synced folder +definition in the Vagrantfile like so: + +``` +config.vm.synced_folder "/path/on/host", "/path/on/guest", + type: "sshfs", sshfs_opts_append: "-o cache=no" +``` + +All caching options that are available to sshfs can be added/modified +in this same manner. + ## Appendix A: Using Keys and Forwarding SSH Agent When [sharing an arbitrary host directory](#sharing-arbitrary-host-directory-to-vagrant-guest---1-of-users)