CentOS 7 開機自動掛載硬碟 or 網路磁碟
先到 /etc/fstab
vi /etc/fstab
內文:
{ip or name}:{路徑} {掛載到centos上的某資料夾} nfs rw 0 0 範例: data.DATANAS.com.tw:/volume1/資訊/ /nfs/IT nfs rw 0 0
存檔後,可以選擇重新啟動或是用
mount -a
馬上生效
如果要臨時卸載掉,可以用
umount -v /nfs/IT
可以參考:
https://www.ichiayi.com/wiki/tech/nfs
https://linux.vbird.org/linux_basic/0230filesystem.php