Skip to content

Commit

Permalink
README: Update for new reverse mounting capability
Browse files Browse the repository at this point in the history
  • Loading branch information
dustymabe committed Jul 28, 2016
1 parent d3e4d8e commit 0070b14
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ folder plugin from the Vagrant core code and molding it to fit SSHFS.

## Modes of Operation

### Sharing Vagrant Host Directory to Vagrant Guest - 99% of users
### Sharing Vagrant Host Directory to Vagrant Guest - 98% of users

This plugin uses SSHFS slave mounts
(see [link](https://github.com/dustymabe/vagrant-sshfs/issues/11))
Expand All @@ -58,6 +58,19 @@ See [Options](#options-specific-to-arbitrary-host-mounting) and
[Appendix A](#appendix-a-using-keys-and-forwarding-ssh-agent) for
more information.

### Sharing Vagrant Guest Directory to Vagrant Host - 1% of users

*NOTE:* This option is dangerous as data will be destroy upon `vagrant destroy`

This plugin allows you to share a folder from a Vagrant guest into the
host. If you have workloads where there are a lot of disk intensive
operations (such as compilation) it may be ideal to have the files
live in the guest where the disk intensive operations would occur.
For discussion see [Issue #7](https://github.com/dustymabe/vagrant-sshfs/issues/7).

See [Options](#options-specific-to-reverse-mounting-guest-host-mount)
for more information on how to enable this type of mount.

## Getting Started

In order to use this synced folder implementation perform the
Expand Down Expand Up @@ -159,6 +172,23 @@ config.vm.synced_folder "/path/on/host", "/path/on/guest",
disabled: false
```

### Options Specific to Reverse Mounting (Guest->Host Mount)

If your host has the `sshfs` software installed then the following
options enable mounting a folder from a Vagrant Guest into the
Vagrant Host:

- `reverse`
- This can be set to 'true' to enable reverse mounting a guest
folder into the Vagrant host.

An example snippet from a `Vagrantfile` where we want to mount `/data`
on the guest into `/guest/data` on the host:

```
config.vm.synced_folder "/guest/data", "/data", type: 'sshfs', reverse: true
```

## 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 0070b14

Please sign in to comment.