Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty sshfs-folders after vagrant resume #54

Open
hashkool opened this issue Nov 11, 2016 · 6 comments
Open

Empty sshfs-folders after vagrant resume #54

hashkool opened this issue Nov 11, 2016 · 6 comments

Comments

@hashkool
Copy link

Currently, when I do vagrant suspend and vagrant resume the sshfs-mountpoints are reportedly mounted, but the files from those mounts are not available. The only way I can work with vagrant-sshfs right now is to vagrant halt and vagrant up a machine.

Example snippet from my Vagrant-file

control.vm.provision :shell, path: "provision.sh"
control.vm.synced_folder ".", "/vagrant", 
                        type: "sshfs",
                        sshfs_opts_append: "-o allow_other"
@dustymabe
Copy link
Owner

hey @hashkool, thanks for the report. I don't use vagrant suspend and vagrant resume so I haven't hit this issue before. I'm not sure if this "should" work or not, it will take some thought.

In the mean time after you resume you should be able to vagrant sshfs --unmount and then vagrant sshfs --mount without having to halt/up.

@hashkool
Copy link
Author

Thanks for your swift reply. I expect it is a "should" , since the vanilla virtualbox folder share mount is preserved under suspend / resume. It was part of my workflow, but that workflow is broken with sshfs.

I would love if sshfs would work like the other file sharing mechanisms for virtualbox. In the mean time I will try your unmount / mount trick.

@dustymabe
Copy link
Owner

I would love if sshfs would work like the other file sharing mechanisms for virtualbox. In the mean time I will try your unmount / mount trick.

let me know if it works

@hashkool
Copy link
Author

This results in some errors unfortunately:

$ vagrant sshfs --unmount
==> web: The folder /srv/http/xyz in the guest is not mounted.
==> control: Unmounting SSHFS shared folder...
==> control: Unmounting SSHFS shared folder mounted at /vagrant
Unmount the SSHFS mount failed.

The command and output are:

umount /vagrant

Stdout from the command:

Stderr from the command:

stdin: is not a tty
umount: /vagrant: not mounted

@dustymabe
Copy link
Owner

This results in some errors unfortunately:

That is actually not bad. It just means that you can skip the unmount. So just try vagrant sshfs --mount by itself.

@hashkool
Copy link
Author

hashkool commented Nov 11, 2016

So just try vagrant sshfs --mount by itself.

Yes, that works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants