NAS vs NFS
before diving inside , we have to differentiate between NAS and NFS.
NAS is a type of network design.
NFS is a type of Protocol used to connect to a NAS.
Network Attached Storage (NAS) is a device that allows users to access files through a network. It allows users to access and share files from their individual stations through a central server.
NFS (Network File System) is a protocol that is used to serve and share files on a network. Similar protocols include SMB (Server Message Block) and AFP (Apple Filing Protocol).
In short, a NAS system can use the NFS protocol to perform its task. However, a NFS is not a NAS.
NFS overview
here in Networks Pioneers : we concern of the relation between ESXI and NAS storage through NFS
NFS (Network File System) is a file-sharing protocol used by ESXi hosts to communicate with a NAS (Network Attached Storage) device over a standard TCP/IP network.
A NAS device is a specialized storage device connected to a network, providing data access services to ESXi hosts through protocols such as NFS.
In pioneers LAB we will use Suse linux server called SLES123.pioneers.lab as NAS storage
NFS datastores are used in much the same way as VMFS datastores : They can hold
- virtual machine files,
- templates,
- ISO images, and other date
An NFS volume supports advanced vSphere features such as:
- vMotion,
- DRS,
- and HA.
ESXi includes a built-in NFS client that uses NFS to communicate with the NFS server.
To use NFS as a shared repository: – you must create a directory on the NFS server and then mount that directory as a datastore on all ESXI hosts.
Note that ESXi hosts must have the read/write permissions on the NFS server and the read/write access must be allowed for the root system account.
NFS components
NFS components used in an vSphere environment include :
- NFS device (server) – a storage device or a server that uses the NFS protocol to make files available over the network.
- NFS datastore – a shared folder on the NFS server that can be used to hold virtual machine files.
- NFS client – ESXi includes a built-in NFS client used to access an NFS device.
NFS network Diagram
as we do always in networks pioneers : it’s better to have a a look to network diagram above to understand the concept
we have Suse Linux Enterprise Server as NFS Server
- name SLES123.pioneers.lab
- management ip address 172.16.100.123 connected to DMZ called [server farm ]
- another NIC connected to DMZ with ip address 172.21.104.123
- SLES123 has HDD with capacity 2TB
- we will create folder on SLES123 with NFS services to let ESXI hosts [ESXI151,ESXI152,ESXI153] to see it as DataStore
also : we have ESXI host server called ESXI151 with
- interface for management with DMZ [server farm ] : with ip address 172.16.100.151
- interface for ISCSI target with DMZ [switch 3 ] : with ip address 172.21.104.151
also : we have ESXI host server called ESXI152 with
- interface for management with DMZ [server farm ] : with ip address 172.16.100.152
- interface for ISCSI target with DMZ [switch 3 ] : with ip address 172.21.104.152
and finally : we have ESXI host server called ESXI153 with
- interface for management with DMZ [server farm ] : with ip address 172.16.100.153
- interface for ISCSI target with DMZ [switch 3 ] : with ip address 172.21.104.153
server SLES123 will act as NFS server
while each ESXI host [ESXI151,ESXI152,ESXI153] will act as NFS client 4
consideration points before Configure NFS
There are consideration points before creating and accessing an NFS datastore:
- At least one VMkernel port for NFS traffic must be created.
- The network-attached storage device should be listed on the VMware Hardware Certification List (HCL)
- NFS version 3 over TCP must be used.
- A file system must be created on the NAS device and exported.
- ESXi hosts must be able to access the NFS server in read-write mode.
- Read-write access must be allowed for the root account.
root_squash option
Sometimes, to protect NFS volumes from unauthorized access, the NFS volumes are exported with the root_squash option enabled.
When root_squash is on, root users are downgraded to unprivileged file system access and the NFS server might refuse the ESXi host access to virtual machine files on the NFS volume.
The no_root_squash option must be used instead of root_squash to export an NFS volume. This option allows root on the client (the ESXi host) to be recognized as root on the NFS server.
Conclusion
in this articles we have got an overview about NASand NFS
during diagram we have understood NFS components and how process are working
in next article we will practice NFS by :
- Configure Suse Linux as NFS server
- create shared folder on NFS services , and set permissions
- configure ESXI host as NFS client by : create port group for NFS asn set vmnic , connect to share resources on NFS server , create datastore
please join us to next article here