Configure NFS in Windows Server
On Windows Server, creating a new NFS server is simple.
First install this:
And then click the folder properties.
And enable that.
Configure NFS in Ubuntu
Run:
sudo apt update
sudo apt install nfs-kernel-server -y
sudo mkdir -p /mnt/nfs_share
sudo chown -R nobody:nogroup /mnt/nfs_share/
sudo chmod 777 /mnt/nfs_share/
And edit the configuration:
sudo vim /etc/exports
Add this:
/mnt/nfs_share 192.168.0.0/24(rw,async,no_subtree_check)
The 192.168.0.0/24
is the subnet which allows to connect to this server.
Finally:
sudo exportfs -a
sudo systemctl restart nfs-kernel-server
If you have ufw
enabled, don't forget to expose 2049
port.
Mounting remote NFS in Windows
Run this in PowerShell.
Enable-WindowsOptionalFeature -FeatureName ServicesForNFS-ClientOnly, ClientForNFS-Infrastructure -Online -NoRestart
Run this in CMD:
# Not admin!!! Do NOT run this as admin!
mount -o anon nfs..server.name:/mnt/nfs_share/ X:
And then you have disk X:
X:
dir
Mounting remote NFS in Ubuntu
sudo apt install nfs-common
sudo mkdir -p /mnt/nfs_remote
sudo mount server-domain-name:/mnt/nfs_share /mnt/nfs_remote
Or you can edit /etc/fstab
and append this line:
server-domain-name:/mnt/nfs_share /mnt/nfs_remote nfs defaults 0 0
Mounting remote NFS as a datastore in VMware ESXI
Go to your VCenter server. Select adding new store.
Select type.
Select version.
Enter server details:
And finally works!
I enjoyed reading your blog post on building a new NFS server with Windows Server or Ubuntu and mounting it. The step-by-step instructions and screenshots provided make it easy for readers to follow along and understand the process. The comparison between Windows Server and Ubuntu is also helpful for those who might be deciding which platform to use.
One of the highlights of your post is the clear organization and presentation of the information. The use of code blocks and images makes it easy for readers to identify the steps they need to take, and the explanations in between provide useful context.
As for areas of improvement, it would be helpful if you could provide a brief introduction to NFS and its benefits before diving into the setup process. This would give readers a better understanding of why they might want to create an NFS server and how it can be beneficial for their environment.
Additionally, while the blog post does a great job of walking readers through the process of setting up an NFS server, it would be helpful to provide some guidance on troubleshooting common issues that may arise during the setup process. This would make the post even more comprehensive and valuable to readers.
Lastly, it might be helpful to provide some information on the performance and security aspects of using NFS, as these are important considerations for many users.
Overall, your blog post is well-written and informative, and I believe it will be a valuable resource for those looking to set up an NFS server. Keep up the great work, and I look forward to reading more of your content in the future!