Linux nfs配置

时间:2022-04-17 20:11:30

***************节点2的arch2目录挂载到节点1下。那么节点2是主节点1是备********

10.230.39.234(节点1)
cat /etc/exports
/arch2 10.230.39.235(rw)

10.230.39.235(节点2)
cat /etc/exports
/arch2 10.230.39.234(rw)

两个节点:
chmod -R 777 /arch2
service portmap start
service nfs start

节点1:
mount -t nfs -o rw 10.230.39.235:/arch2 /arch2

两个节点自动启动portmap和nfs服务:
chkconfig --level 2345 portmap on
chkconfig --level 2345 nfs on

节点1设置自动挂载主服务器的共享目录 :
vi /etc/fstab
10.230.39.235:/arch2 /arch2 nfs defaults 0 0