Data / Storage

How To: Mount an NFS volume in Windows Explorer

By default Windows doesn’t allow you to mount an NFS based volume through explorer on a Windows client. Because a customer of mine was struggling to mount their ANF volume to an NFS client running on a Windows OS via the explorer and via the command prompt

So i wanted to test this on our lab environment on Azure and take you through this step by step.
Assumption is that there is already a Capacity pool (regardless of the tier) and a volume with a name.
For this blog i created “verron01” as volume name and a folder called “volume-verron”
Also you want to make sure that your Windows OS has a client for NFS installed

Step 1 – Mounting your FileSystem

Create a new directory on your Azure instance, in this case via a Linux Server:

sudo mkdir volume-test
Folder/directory has been created

Step 2 – Select the mount target IP address

In this case :

Step 3 – Mount your file system using the command/s below

sudo mount -t nfs -o rw,hard,rsize=1048576,wsize=1048576,vers=3,tcp volume-test

Step 4 – Map Network Drive in Explorer – First attempt

This will not work because we don’t have the right privileges on the volume to execute this.
Let’s go back to the Linux instance and check what the file permissions are on the mounted volume for the volume-test folder

ls -hal

On the folder/directory level you see we have no rights on the “- – -“. This is broken down in User level (directory, read, write, execute), Group level (read,write and execute) and other (no file permissions)

Step 5 – Provide the correct rights on the right level

To change this we need to use the following command on the Linux instance

sudo chmod 777 volume-test

This provides the RWX access to others. Meaning they can mount the volume and have the ability to delete/create files/folders.
If you want a users to be able to only Read and Write you should use chmod 775 command.

Step 6 – Map Network drive via Windows Explorer – Second attempt

As you see this will fail.

Step 7- Mounting the volume to a drive via command line (CMD)

mount \\\volume-test Z:

Now the volume is mounted to the Z: drive and visible in Windows Explorer

Please note that the mounted volume will not appear in explorer if you run it from the command prompt as Administrator


File Permissions in Linux/Unix with Example

Photo by Maksym Kaharlytskyi on Unsplash

Leave a Reply

%d bloggers like this: