Users of Windows Server 2012 R2 and later versions can mount a file system on any available drive letter using the mount target IP address and the file system export path.
The Windows NFS client must be installed on the instance from which you want to mount the file system.
Caution
Installing the Windows NFS client might require a restart of your system.
Access to NFS file systems requires UNIX-style user and group identities, which aren't the same as Windows user and group identities. To enable users to access NFS shared resources, Windows client for NFS accesses file systems anonymously, using AnonymousGid and AnonymousUid. On brand new file systems, write permissions are only granted to the root user. The AnonymousGid and AnonymousUid identity values must be configured to allow write access.
Caution
Updating the 'AnonymousGid' and 'AnonymousUid' values require registry changes to your system.
After you have installed the NFS client and correctly mapped user identities, you can mount the file system to any available drive letter using the command line or Map network drive. You can access your file system through the chosen drive letter to write files.
Prerequisites
The file system must have at least one export in at least one mount target. When you create a new file system, an export for the file system is created at the same time. See Creating File Systems for more information.
Correctly configured security rules for the mount target. See Security Rules for information about how security rules work in Oracle Cloud Infrastructure. Use the instructions in Configuring VCN Security Rules for File Storage to set up security rules correctly for your file systems.
Caution
Because Windows network providers prioritize SMB traffic over NFS traffic, there can be delays when connecting to a File Storage mount target for the first time. Subsequent connections are faster because the mount information is cached, but after the cache expires, the delay reoccurs. This causes intermittent slow performance. To improve performance, you can change the network provider order so that the NFS client is prioritized. For more information, see Accessing a Mounted File System is Slow or Fails After a Few Seconds.
Note
When mounting file systems, Network Lock Manager (NLM) is enabled for file locking by default. The default requires no specified mount option. Typical NFS workloads function normally using the default.
Some applications might require you to specify the nolock mount option. Refer to your application documentation for best practices regarding this mount option.
If you're using Windows platform images, the NFS client is already installed, and the correct user identities are mapped. Skip to step 4.
Open Windows PowerShell and run as Administrator:
Go to Start and click the Windows PowerShell icon.
In Windows PowerShell, type the following to run as Administrator:
Copy
Start-Process powershell -Verb runAs
In the User Account Control window, click Yes. A new Administrator: PowerShell window opens. You can close the standard PowerShell window to avoid confusing them.
In Administrator: PowerShell, get the NFS client by typing the following:
If you've set export options for your file system to require clients to connect from a privileged source port (1-1023), then you must set the UseReservedPorts registry key to 1.
NFS file systems mounted as Administrator aren't available to standard users.
In the standard Windows Command Line (CMD) window, mount the file system by typing the following:
Copy
mount -o sec=sys 10.x.x.x:/fs-export-path X:
Replace 10.x.x.x: with the local subnet IP address assigned to the mount target.
Note
If the export uses Kerberos authentication, use the fully qualified domain name (FQDN) of the mount target instead of the IP address.
Replace fs-export-path with the export path you specified when associating the file system with the mount target.
Tip
Export path information is available in the Details page of the mount target associated with your file system. See Getting a Mount Target's Details for more information.
Important
The export path is the path to the file system (relative to the mount target IP address or hostname). If you didn't specify a path when you associated the file system and mount target, then "/" represents the full extent of the mount target. In that case, you must use a "!" when mounting the file system. For example: mount 10.0.0.0:/! X:
Replace X with the drive letter of any available drive you want to map the file system to.
If the export is using AUTH_SYS alone, the sec option is optional. If the export uses Kerberos authentication, replace sys with krb5, krb5i, or krb5p.
Note
If an NFS client uses an export which has multiple authentication types, and file system is mounted without specifying sec=<auth_type>, the client should automatically pick the strongest authentication type supported by the export.
Write a file to the file system by typing the following. Replace X with the drive letter you used in step 10 and helloworld with your file name.
Copy
X:
Copy
echo > helloworld.txt
Verify that you can view the file by typing the following.
If you are using Windows platform images, the NFS client is already installed, and the correct user identities are mapped. Skip to step 9.
Open Windows PowerShell and run as Administrator:
Go to Start and click the Windows PowerShell icon.
In Windows PowerShell, type the following to run as Administrator:
Copy
Start-Process powershell -Verb runAs
In the User Account Control window, click Yes. A new Administrator: PowerShell window opens. You can close the standard PowerShell window to avoid confusing them.
In Administrator: PowerShell, get the NFS client by typing the following:
Copy
Install-WindowsFeature -Name NFS-Client
If necessary, restart your system.
Open the registry editor (regedit) to map the AnonymousGid and AnonymousUid to the root user.
Caution
User identity mapping requires changes to your system registry.
Click Windows Search.
Enter regedit in the Search field and press
Enter.
Click Yes to allow changes to your device.
Click HKEY_LOCAL_MACHINE. Then, browse to:
Software\Microsoft\ClientForNFS\CurrentVersion\Default.
Add a new DWORD32 registry entry for AnonymousGid:
Click Edit, and select New DWORD (32 bit) Value.
In the Name field, enter AnonymousGid. Leave the value at 0.
Repeat step 5 to add a second DWORD32 registry entry named
AnonymousUid with a value of 0.
Important
If you've set export options for your file system to require clients to connect from a privileged source port (1-1023), then you must set the UseReserverdPorts registry key to 1.
Open Windows Command Line (CMD) and run as Administrator:
Go to Start and scroll down to Apps.
In the Windows System section, press Ctrl+Shift and click Command Prompt.
In the Windows Command Line (CMD) window, restart the NFS Client by typing the following:
Copy
nfsadmin client stop
Copy
nfsadmin client start
Open File Explorer and select This PC. In the Computer tab, select Map network drive.
Select the Drive letter that you want to assign to the file system.
In the Folder field, enter the following. Replace 10.x.x.x with the local subnet IP address assigned to your mount target, and fs-export-path with the export path you specified when associating the file system with the mount target.
Copy
\\10.x.x.x\fs-export-path
Tip
IP address and export path information is available in the Details page of the mount target associated with your file system. See Getting a Mount Target's Details for more information.
Important
The export path is the path to the file system (relative to the mount target IP address or hostname). If you did not specify a path when you associated the file system and mount target, then "\" represents the full extent of the mount target. In that case, you must use a "!" when entering the file system folder path. For example: \\10.0.0.0\!
If your file system has an existing directory structure, you can mount any file system subdirectory. The subdirectory becomes the effective root directory at the mount point of the instance, and excludes sibling directories.
For example, suppose "FileSystem1" has an export path of /FileSystem1 and a directory structure like this:
The file system is exported from "MountTarget1" which has an IP address of 10.0.0.16.
The following command mounts directoryA to drive letter X:
Copy
mount 10.0.0.16:/rootdirectory/directoryA X:
Neither directoryB or FileB would be accessible from drive X.
Caution
Mounting a subdirectory to limit access to sibling directories is not sufficient to secure your file system. For information on security methods, see About File Storage Security.
Follow the instructions to install the NFS client and add the registry entries for AnonymousGid and AnonymousUid.
After the NFS client is installed and registry entries are added, both mounting methods describe how to enter the mount information for the file system. Depending on which method you use, edit the mounting information to append the subdirectory path to the export path:
Replace 10.x.x.x: with the local subnet IP address assigned to your mount target.
Replace fs-export-path with the export path you specified when associating the file system with the mount target.
Replace directory-path with the path from the root directory to subdirectory you want to mount.
Copy
mount 10.x.x.x:/fs-export-path/directory-path X:
If you're Using Windows File Explorer, enter the following in the Folder field of the drive letter you want to map the file system to (step 11):
Replace 10.x.x.x: with the local subnet IP address assigned to your mount target.
Replace fs-export-path with the export path you specified when associating the file system with the mount target.
Replace directory-path with the path from the root directory to subdirectory you want to mount.
Copy
\\10.x.x.x\fs-export-path\directory-path
Unmounting File Systems 🔗
Using the command line:
In the standard Windows Command Line (CMD) window, mount the file system by typing the following. Replace 10.x.x.x: with the local subnet IP address assigned to your mount target, fs-export-path with the export path you specified when associating the file system with the mount target, and X with the drive letter of any available drive you want to map the file system to.
Copy
umount X: 10.x.x.x:/fs-export-path
Note
Unmounting might require using the -f flag in the umount command. For example: