5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vagrantで別パーティションの共有フォルダ追加 for Windows7

Last updated at Posted at 2014-04-30

はじめに

Windows環境でvagrantの共有フォルダを別のパーティションでマウントする方法です。
今回はYドライブを対象にします。
ちなみにvagrantのディレクトリはDドライブです。

この方法でもNFSをマウントしたい場合ホストOS側でマウントしてないと行けないので、なんかとても面倒です。。
良い方法探し中

Vagrantfileの設定

仮に今回はYドライブのmtm_downというところを/mtm_downでマウントします。

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
...
  config.vm.synced_folder "Y:/mtm_down", "/mtm_down", type: "nfs"
...

再起動

$ vagrant reload
...
==> default: Mounting shared folders...
    default: /vagrant => D:/myVagrantUbuntu3
    default: /mtm_down => Y:/mtm_down
...

ログインして確認

無事マウントされてます。

$ vagrant ssh
...
$ df
Filesystem      1K-blocks       Used Available Use% Mounted on
/dev/sda1        41251136    1500940  38014284   4% /
none                    4          0         4   0% /sys/fs/cgroup
udev               249888         12    249876   1% /dev
tmpfs               50728        340     50388   1% /run
none                 5120          0      5120   0% /run/lock
none               253624          0    253624   0% /run/shm
none               102400          0    102400   0% /run/user
/vagrant        953118720  720425984 232692736  76% /vagrant
/mtm_down      1953512444 1766780044 186732400  91% /mtm_down
5
5
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
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?