NFS server Steps
Configure SLES123 as NFS server include the following step:
- install NFS services
- start and enable NFS service
- create firewall rule on SLES to pass service NFS
- create folder /store/DS05 [you can set any name ] and set permission
- share folder /store/DS05
- export file
- verify NFS folder exported
Step 01 : install package [NFS] on SLES123
irst of all we have to check if package nfs-kernel-server [which is responsible of running NFS ] is installed or NOT
use command :
zypper info nfs-kernel-server
if NFS is NOT installed > then simply install it using command
zypper install --no-confirm nfs-kernel-server
Step 02 : start services nfs
now we have to check if service nfs is running
use command :
systemctl status nfs-server
if NOT started then > start it
systemctl start nfs-server
also we have to Enable sshd
during system startup
systemctl enable nfs-server
Step 03 : Enable firewall rule for nfs
create firewall rule to enable nfs
firewall-cmd --permanent --add-service={nfs3,mountd,rpc-bind}
then reload firewall
firewall-cmd --reload
Step 04 : create folder to be shared
we have folder /store mounted to HDD with capacity 2TB
so we create a directory to be share /DS05
mkdir -p /DS05
, then we changed the ownership and permissions on it.
chown nobody:nogroup /DS05
chmod 777 /DS05
Step 05 share folder on NFS
file /etc/export is responsible of NFS sharing
so we open file /etc/export with text editor vim [note vim like notepad in windows ]
vim /etc/exports
and enter the following entry in files:
/DS05 *(rw,no_root_squash,sync,no_subtree_check)
The “*” allows any IP address to access the share,
and rw allows read and write operations. There are many other operations that can be used with NFS that yo can check it online
then exported the files, and restarted the NFS server following commands:
exportfs -a
systemctl restart nfs-server
Step 06 : verify NFS shared folder
then entered showmount -e to see the NFS folders/files that were available
showmount -e
also we can check folder capacity with command
df /DS05
Conclusion
in this article Part 2 of connect ESXI to NFS : we have seen how to configure NFS server
you can configure windows server as NFS server > but here in networks Pioneers we would like to show the beauty of SLES Sue Linux Enterprise Server server as NFS Server
please join us article in part 3 here to see how to configure ESXI as NFS client and how to create NFS datastore