PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 疑難雜症區
(https://www.pcdvd.com.tw/forumdisplay.php?f=34)
- - virtualbox 額外硬碟資料 nfs 看不到的問題
(https://www.pcdvd.com.tw/showthread.php?t=1131757)
|
---|
virtualbox 額外硬碟資料 nfs 看不到的問題
virtualbox 安裝 ubuntu 16.04 64bit 後,容量不夠了新增sata硬碟
按照此篇文章後掛載到 /home/bk/disk1 http://flyfox.pixnet.net/blog/post/...%A1%AC%E7%A2%9F fstab為了讀寫與執行內容改成: /dev/sdb1 /home/bk/disk1 auto defaults 0 0 這樣重開機會自動掛載,也可讀寫執行; 設定nfs server, /etc/exports 增加內容如下 /home/bk 192.168.0.*(rw,sync,no_root_squash,no_subtree_check) 用戶端mount 指令 mount -t nfs 192.168.0.12:/home/bk /nfs /home/bk 下個資料夾都可讀取、寫入 但 home/bk/disk1 下都讀不到檔案,但可寫入 用 sudo chown bk:bk home/bk/disk1 修改使用者與群組也沒用 請問有解嗎? |
你掛載的順序錯了,導致寫入的地方跟你想的不是同一個地方。
|
引用:
可否請教一下順序該怎麼改? 感謝 |
抱歉會錯意
1.先確認/home/bk/disk1資料夾有建立再掛載。 2./home/bk 192.168.0.*(rw,sync,no_root_squash,no_subtree_check) 改成 /home/bk 192.168.0.0/24(rw,sync,no_root_squash,no_subtree_check) |
引用:
1 的話 /home/bk/disk1 在 virtualbox內的ubuntu桌面系統的terminal可以正常使用,有建立,不然也不能掛載。 2 的話明天到公司會再試試。 |
2個附加檔案
剛把2改掉確認還是不行,
virtualbox df 資訊 pcdvd似乎很難編排已貼圖在後面 引用:
用戶端 df 資訊 引用:
用戶端 mount 指令 引用:
另外發現,用戶端在/nfs/disk1 寫的檔案, 在 virtualbox 要 umount /home/bk/disk1 後才看得到, 似乎在nfs client端看不到那顆硬碟 |
1./etc/export 修改完 nfs service restart
2.再看不到的話,client端 mkdir /nfs/disk1 mount -t nfs 192.168.0.12:/home/bk /nfs mount -t nfs 192.168.0.12:/home/bk/disk1 /nfs/disk1 |
1個附加檔案
引用:
修改完有用 sudo systemctl restart nfs-kernel-server 重啟 附圖是2的結果仍是不行,a 是用戶產生的檔案,非 virtualbox ubuntu內的檔案 |
1.server端的/home/bk掛到client端後,client的/nfs/bk讀寫正常嗎?
2.確認server端/home/bk/disk1/讀寫。 3. server端 /etc/exports /home/bk/disk1 192.168.0.0/24(rw,sync,no_root_squash,no_subtree_check) 4.server端exportfs -arv 5.client端nfs service restart https://wiki.gentoo.org/wiki/Nfs-utils |
所有的時間均為GMT +8。 現在的時間是10:47 AM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2024。