Skip to content

Commit

Permalink
Merge pull request #39 from dustymabe/dusty-add-faq
Browse files Browse the repository at this point in the history
Add FAQ
  • Loading branch information
dustymabe authored Aug 1, 2016
2 parents 4fd3fd3 + 900c627 commit 18f1edf
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 18f1edf

Please sign in to comment.