Synced folder - maybe I'm not understanding how it works.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Synced folder - maybe I'm not understanding how it works.

French Fry
promise to make this the last question of the week ;)

I may not understand what sync folders will actually do for me .

Here is my vagrantfile line:

 config.vm.synced_folder "/www/", "/usr/rails_projects/DevcampPortfolio"

Now with that the share is created.  I can create a file on the host in the www directory and it will show up in DevcampPortfolio.  As well, I can create a file in DevcampPortfolio and it shows up in /www. However what I really want is access to what is inside of DevcampPortfolio, which is a Rails application with all regular files and folders that make up the app.  Right now, if I cd into the DevcampPortfolio folder (on the guest) I can no longer see the directories and files of my app.  If I remove the sync then I can see those files / folders again.  Also I see none of them in the /www folder.

What I want to use this for is the ability to edit the files in my host. Should I be able to and I'm thinking maybe it's a permissions issue though but I'm not sure.  Basically when I go into /www on the host I want to see my Rails app and have access to everything. 

Hopefully the question is clear.  Help appreciated.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/8d364917-e8d5-4c60-8ce5-79edfb131317%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Synced folder - maybe I'm not understanding how it works.

French Fry

When it says first parameter should be relative to project path, are we speaking about the folder where the vagrantfile is stored? I think maybe that was my mistake.  The shares I made were going in host to C:/mysyncedfolder.  Or, it is a matter of permissions and/or owner and other particulars.  Until I figure this out I'm using the default share /vagrant.  

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/098add1c-a995-4933-a846-680850ef0543%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Synced folder - maybe I'm not understanding how it works.

Alvaro Miranda Aguilera
Hi

You can ask all the question you have, feel free to send more :D



www will be local where your Vagrantifle is, like included in the project.

If you want to share that other path then try

 config.vm.synced_folder "C:/mysyncedfolder", "/usr/rails_projects/DevcampPortfolio"


If you can do

vagrant halt
vagrant up

and share the log, that will confirm all is good. 

If you do changes to Vagrantifle, the way to apply them is to run:
vagrant reload

Also, share the output of

vagrant ssh -c 'df -Ph'
vagrant ssh -c 'mount'

To have a look on the guest side

Thanks!
Alvaro


On Fri, Jun 2, 2017 at 1:42 AM, French Fry <[hidden email]> wrote:

When it says first parameter should be relative to project path, are we speaking about the folder where the vagrantfile is stored? I think maybe that was my mistake.  The shares I made were going in host to C:/mysyncedfolder.  Or, it is a matter of permissions and/or owner and other particulars.  Until I figure this out I'm using the default share /vagrant.  

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/098add1c-a995-4933-a846-680850ef0543%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ey_myMdf6S6sw6Cedqj1xoniPPXRt0UeUjgisM0mJjskQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Synced folder - maybe I'm not understanding how it works.

French Fry
I'm not following why /www/ would be in the same directory as Vagrantfile.  I find /somedir/ is always mapped to C:/. 
I tried again this line:

config.vm.synced_folder "C:/share/", "/var/log/", mount_options: ["dmode=777", "fmode=666"] 

I could be wrong but figured if it was a permissions issue the mount_options might help. Results turned out the same though.  In C:/share there is one empty sub folder '/'postgresql' , it's empty though.  With the sync in place, if I cd into /var/log all that is showing (ls -a, ls la) is the empty postgresql.  If I disable the sync, then the full /var/log is there.  I can create new files and folders, and they will be synced between c:/share and /var/log. 

I am curious why vagrant-vbguest shows up in the log.  I thought that was a separate plugin.  Anyway, thank you and here is all the output and logs:

https://gist.github.com/stuartambient/6ed5aff23f273047dfdfcdc2dabfac3f

On Friday, June 2, 2017 at 12:43:17 AM UTC-6, Alvaro Miranda Aguilera wrote:
Hi

You can ask all the question you have, feel free to send more :D



www will be local where your Vagrantifle is, like included in the project.

If you want to share that other path then try

 config.vm.synced_folder "C:/mysyncedfolder", "/usr/rails_projects/DevcampPortfolio"


If you can do

vagrant halt
vagrant up

and share the log, that will confirm all is good. 

If you do changes to Vagrantifle, the way to apply them is to run:
vagrant reload

Also, share the output of

vagrant ssh -c 'df -Ph'
vagrant ssh -c 'mount'

To have a look on the guest side

Thanks!
Alvaro


On Fri, Jun 2, 2017 at 1:42 AM, French Fry <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="J1MAPjf0CAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">samb...@...> wrote:

When it says first parameter should be relative to project path, are we speaking about the folder where the vagrantfile is stored? I think maybe that was my mistake.  The shares I made were going in host to C:/mysyncedfolder.  Or, it is a matter of permissions and/or owner and other particulars.  Until I figure this out I'm using the default share /vagrant.  

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="J1MAPjf0CAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/098add1c-a995-4933-a846-680850ef0543%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/098add1c-a995-4933-a846-680850ef0543%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/098add1c-a995-4933-a846-680850ef0543%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/098add1c-a995-4933-a846-680850ef0543%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/a7e64e6c-205d-4e28-9681-d3b33709e941%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Synced folder - maybe I'm not understanding how it works.

French Fry
In reply to this post by French Fry
Alvaro,
Any chance you were able to look over the output and logs I posted ?

Thanks
Stuart

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b3275b73-d00c-4752-8bc0-f938e02aefac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.