Saturday, December 16, 2017

quick nfs mount on CentOS

#find your ip
ifconfig
#create folder to share
sudo mkdir -p /drbd/main/shared
#who cares about security
sudo chmod -R 777 /drbd/
#create folder where local files should appear
mkdir -p /home/centos/ocpnfs
sudo vi /etc/exports
#enter this in /etc/exports
/drbd/main/shared/ 10.0.2.15(rw)
#end of /etc/exports
sudo systemctl restart nfs
sudo exportfs -v
sudo mount -t nfs 10.0.2.15:/drbd/main/shared/ /home/centos/ocpnfs
touch /home/centos/ocpnfs/pippo.txt



No comments: