Looking for developer recommendations on using shared fs with linux

Discussion in 'Linux Guest OS Discussion' started by popmonkey, Oct 25, 2018.

  1. popmonkey

    popmonkey Bit Poster

    Messages:
    5
    i'm sure there are others who successfully do this kind of work so i am looking for recommendations on how to use an OS X editor to edit files on a guest linux system.

    I have a Centos server (no desktop) guest system that i do development on. i recently started using VSCode and would like to use it on this guest. i've hooked up an os x directory as a shared folder and mounted that in the guest system. however, the server processes on the guest system are not seeing file changes unless i reboot the guest or disconnect and reconnect the shared drive. i'm guessing this has to do with the way the FS communicated modifications to the kernel. what's super strange is that if i cat the changes they appear and yet the server (nginx with fastcgi via php-fpm) are not seeing them. what really crazy is that even when i restart nginx and php-fpm the old versions of those files are being server.

    this did not happen when the fs was native linux and i was editing the files locally using vi (so it's not a caching issue, i've turned the APC cache off)
     
    Last edited: Oct 25, 2018
  2. Vojta

    Vojta Bit Poster

    Messages:
    3
    I'm affected by this too (I use a macOS host to run a Debian VM (via Vagrant) for development). The weird part is that using cat or less, I see the changes in files, but when using them with PHP (even running with the CLI version of PHP) the version that was there when the folder was mounted is seen. Plus (and that's even weirder), I get lots of PHP Warning: Unexpected character in input: ' trying to run a script that has been changed.
     
  3. Vojta

    Vojta Bit Poster

    Messages:
    3
    To add more info, I'm on macOS 10.13.6, using Parallels Desktop Pro 14.0.1 (45154). I tried with parallels/debian-8.6 and generic/debian9 Vagrant images. In both I let Vagrant install the correct version of Parallels Tools and installed PHP 7.2 from deb.sury.org. Somebody from Parallels please look into this. It's killing my development setup, I have to use shared folders over SMB (didn't manage to get NFS to work for some reason) which don't support symlinks. Everything worked fine in Parallels Desktop 13.
     
  4. Vojta

    Vojta Bit Poster

    Messages:
    3
    FYI I managed to create a support ticket with Parallels, so hopefully somebody will look into this and fix it.
     
  5. popmonkey

    popmonkey Bit Poster

    Messages:
    5
    thanks for the response, Vojta - glad i'm not the only one having this problem - and btw,
    Yes exactly this too! i didn't mention it because it just seemed so strange i was worried it would get dismissed :)
     
  6. popmonkey

    popmonkey Bit Poster

    Messages:
    5
    it's getting much worse - now my guest OS is reporting super strange errors such as invalid python and php when they look perfectly valid :/

    anyone have any ideas on how to do this kind of development? i'm thinking i'm going to have to run some sort of rsync between the two OSes :( :(
     
  7. RussCr0

    RussCr0 Bit Poster

    Messages:
    10
    I'm not 100% sure this is the same issue I saw not long ago, but as a work around I basically started using sshfs to connect from the HOST machine (Mac OS) to the guest machine (Ubuntu), and editing files from my Mac to that mounted filesystem.

    That seemed to work ok for me.
     
  8. popmonkey

    popmonkey Bit Poster

    Messages:
    5
    thanks @RussCr0 - that's pretty much the direction i'm leaning as well. i tried doing an inotify based rsync but the os x filesystem as seen by the guest does not fire notifications in an expected manner so that was also a fail.
     

Share This Page