nfs 掛載

nfs 掛載試驗

172.16.74.105 nfs client  

172.16.74.106 nfs server


nfs 上 

第一步:

nfs server 上安裝     (nfs  client  上也需要安裝)

yum install nfs-utils


第二步:

nfs配置文件

# cat /etc/exports 

/tmp *(rw,sync,no_root_squash)


第三步:

nfs啓動

# /etc/init.d/rpcbind start

# /etc/init.d/nfs start


第四步:

查看共享的目錄

# exportfs -rv


第五步:

client掛載

yum -y install nfs-utils

# cat /etc/fstab

172.16.74.106:/data /nfs nfs defaults,noatime 1 2


# mount -a


第六步:

nfs server 查看掛載項

# showmount -e 172.16.74.106

Export list for 172.16.74.106:

/data *


第七步:

異常描述:

1.在 nfs server 上 把 nfs 服務停掉,client 上 執行 df -h 會被卡住


解決:

1.在 nfs server 上 把 nfs 重啓下,備註:reload 貌似不行

# /etc/init.d/rpcbind restart

# /etc/init.d/nfs restart

        2.在 nfs client 上執行 df -h 可以正常執行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章