LoginSignup
0
1

More than 5 years have passed since last update.

NetCommons3の開発に使ってるVagrantが遅いので共有フォルダ設定をnfsにする。

Posted at

Mac環境での話です。
以前も一度設定してたんですが、Mac本体のディスクフルに伴ってVagrantの設定ファイル壊れたりとか色々あって、再度設定しました。

設定時にちとハマったのでメモがてら^^;

    node.vm.synced_folder '.', '/var/www/app',
    :create => true, :owner=> 'www-data', :group => 'www-data'

となってたのを

    node.vm.synced_folder '.', '/var/www/app',
    :create => true, :owner=> 'www-data', :group => 'www-data', type:"nfs"

としてnfsへ
そしたら vagrant up時にエラー

There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* Shared folders that have NFS enabled do not support owner/group
attributes. Host path: .

ownerとgroupはnfsにしたときは使えないってことのようだ。ってことでその指定を除外してみる。

    node.vm.synced_folder '.', '/var/www/app',
    :create => true, type:"nfs"

再び vagrant upするが今度は違うエラー

NFS is reporting that your urus file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":

exports:2: path contains non-directory or non-existent components: /Users/ryuji/htdocs/NetCommons3
exports:2: no usable directories in export entry and no fallback

ぐぐってみると/etc/exportsを削除しろってことらしいので

$ sudo rm -rf /etc/exports

これで無事起動できるようになりました

参考

- Vagrantの動作が遅かったので共有フォルダ設定とVirtualBox環境のメモリ設定を見直してみました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1