如題。
之前我使用NFS,NFS會有同步問題。比如編譯文件時候的時間同步問題,見前邊的文章。
如今,我們使用高級的virtfs:
見:https://www.linux-kvm.org/page/9p_virtio
一: host上的設置,使用類似如下的參數:
13 -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=Tsrc \ 14 -fsdev local,security_model=passthrough,id=fsdev0,path=/root/Src \
二: 在guest的設置,掛載:
大概是這樣的,
# mkdir /tmp/host_files
# mount -t 9p -o trans=virtio,version=9p2000.L hostshare /tmp/host_files
CentOS7還不支持,所以我也沒試出來。
[root@D129 ~]# cat /boot/config-3.10.0-327.el7.x86_64 |grep -i 9p # CONFIG_NET_9P is not set [root@D129 ~]#