共享存儲

controller節點

vim /etc/hosts
172.16.11.150 compute-node-01
yum install -y nfs-utils
mkdir /data
vim /etc/exports
修改爲:
/data compute-node-01(rw,sync,fsid=0,no_root_squash)  
vim /etc/idmapd.conf
Domain = hostname(主機名)

啓動服務:

systemctl enable rpcbind.service nfs-server.service
systemctl start rpcbind.service nfs-server.service
systemctl start nfs-lock nfs-idmap

查看狀態:

rpcinfo -p

關閉防火牆:

systemctl stop firewalld
systemctl disable firewalld

安裝配置所有計算節點的nfs客戶端

yum install -y nfs-utils
systemctl enablerpcbind.service
systemctl start rpcbind.service
showmount -e 172.16.11.149

掛載:
mount -t nfs 172.16.11.149:/data /cgls
在nfs服務器的/data創建文件看是否在計算節點的/cgls

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