Mounting File Systems On Microsoft Windows Instances

You can make file systems available to Microsoft Windows instances by mapping a network drive to the mount target IP address and export path provided by the File Storage service. You can accomplish this task using NFS or SMB protocols.

Using the SMB protocol requires that the Microsoft Windows instances and Oracle Private Cloud Appliance belong to the same Active Directory domain.

For more information about configuring Active Directory in the Service Enclave, refer to Configuring the Active Directory Domain for File Storage in the Hardware Administration chapter of the Oracle Private Cloud Appliance Administrator Guide.

For more conceptual information, refer to the File Storage Overview chapter in the Oracle Private Cloud Appliance Concepts Guide.

Mounting a File System On a Microsoft Windows Instance Using NFS

Prerequisites

Before You Begin

The following tasks are included in this procedure, and you might want to be aware of them before you begin.

  • Installation of the Microsoft Windows NFS Client – This service must be installed on the instance from which you want to mount the file system. Installing the client often requires a restart of the instance.

  • The AnonymousGid and AnonymousUid identity values must be configured to allow write access. – Access to NFS file systems requires UNIX user and group identities, which are not the same as Microsoft Windows user and group identities. By default, file systems write permissions are only granted to the root user. To enable user access to NFS shared resources, the Microsoft Windows client for NFS accesses file systems anonymously, using AnonymousGid and AnonymousUid.

    Caution:

    Updating the AnonymousGid and AnonymousUid values require registry changes to your instance.

Choose one the following methods:

Using the Microsoft Windows Command Prompt

  1. Log into your Microsoft Windows instance.

    See Connecting to a Compute Instance.

  2. Open Microsoft Windows PowerShell and run as Administrator:

    1. Go to Start and open Microsoft Windows PowerShell.

    2. In Microsoft Windows PowerShell, type the following to run as Administrator:

      Start-Process powershell -Verb runAs
    3. 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.

  3. In Administrator: PowerShell, get the NFS client and update the registry by typing the following:

    Install-WindowsFeature -Name NFS-Client
    Set-ItemProperty HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default -Name AnonymousUid -Value 0
    Set-ItemProperty HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default -Name AnonymousGid -Value 0
    Stop-Service -Name NfsClnt
    Restart-Service -Name NfsRdr
    Start-Service -Name NfsClnt
  4. Open a standard Command Prompt Window.

    Important:

    NFS file systems mounted as Administrator are not available to standard users.

  5. From the Command Prompt window, mount the file system.

    See the cautions and notes below the example.

    In the following example, replace:

    Example:

    mount 10.x.x.x:/fs-export-path X:
  6. Verify that you can access and write to the file system.

    1. Access the file system.

      In the example, replace X with the drive letter you used to mount the file system.

      X:
    2. Write a file.

      echo > myfile.txt
    3. Verify that you can view the file.

      dir

Using Microsoft Windows File Explorer

  1. Log into your Microsoft Windows instance.

    See Connecting to a Compute Instance.

  2. Open Microsoft Windows PowerShell and run as Administrator:

    1. Go to Start and open Microsoft Windows PowerShell.

    2. In Microsoft Windows PowerShell, type the following to run as Administrator:

      Start-Process powershell -Verb runAs
    3. 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.

  3. In Administrator: PowerShell, get the NFS client by typing the following:

    Install-WindowsFeature -Name NFS-Client
  4. If necessary, restart your system.

  5. 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.

    1. Click Windows Search.

    2. Enter regedit in the Search field and press Enter.

    3. Click Yes to allow changes to your device.

    4. Click HKEY_LOCAL_MACHINE. Then, browse to: Software\Microsoft\ClientForNFS\CurrentVersion\Default.

  6. Add a new DWORD32 registry entry for AnonymousGid:

    1. Click Edit, and select New DWORD (32 bit) Value.

    2. In the Name field, enter AnonymousGid. Leave the value at 0.

  7. Repeat the previous step to add a second DWORD32 registry entry named AnonymousUid with a value of 0.

  8. Open Microsoft Windows Command Line (CMD) and run as Administrator:

    1. Go to Start and scroll down to Apps.

    2. In the Windows System section, press Ctrl+Shift and click Command Prompt.

  9. In the Microsoft Windows Command Line (CMD) window, restart the NFS Client by typing the following:

    nfsadmin client stop
    nfsadmin client start
  10. Open File Explorer and select This PC. In the Computer tab, select Map network drive.

  11. Select the Drive letter that you want to assign to the file system.

  12. In the Folder field, enter the following line, replacing:

    Line:

    \\10.x.x.x\fs-export-path
                            
  13. Click the Finish button when complete.

Mounting a File System on a Window Instance Using SMB

General Prerequisites

Specific Prerequisites for SMB Support

SMB support for the File Storage service requires that both Oracle Private Cloud Appliance and the client Microsoft Windows instances belong to the same Active Directory (AD) domain.

This procedure assumes that the AD service is already configured in your data center infrastructure.

To add a Microsoft Windows instance to your AD service, perform the necessary administrative tasks according to the documentation for your version of Microsoft Windows OS.

To add the appliance to your AD service, an administrator with privileges to the OOracle Private Cloud Appliance Service Enclave must add the AD domain name to the appliance's Active Directory Domain configuration. For information on how to perform this task, refer to Hardware Administration in the Oracle Private Cloud Appliance Administrator Guide.

Relaxing File System Permissions Before Network Mapping with SMB

By default, write permissions to a file system are limited to the UNIX superuser and group identity. To provide write permission to AD domain users, the permissions need to be relaxed.

  1. Mount the network drive using NFS protocol.

    See Mounting a File System On a Microsoft Windows Instance Using NFS.

  2. Relax the file system permissions:

    1. Open File Explorer, select the mapped drive and right-click on it, then select Properties.

    2. Select the NFS Attributes tab.

    3. Change File permissions by checking all RWX check boxes to relax the permissions for Owner, Group, and Other.

    4. Click OK.

  3. Disconnect the NFS-mounted drive.

    Now that the file system permissions are relaxed, you can mount the file system using the SMB protocol.

Mounting a File System Using SMB

  1. Log into your Microsoft Windows instance.

    See Connecting to a Compute Instance.

  2. Open File Explorer and select This PC.

  3. In the Computer tab, select Map network drive.

  4. In the Folder field, enter the following line and replace these items:

    • 10.x.x.x with the mount target IP address.

    • fs-export-path-ID with the file system export path (see Creating an Export for a File System)

      Note – Do not include \export in the fs-export-path-ID string when mounting using SMB.

    \\10.x.x.x\fs-export-path-ID

    Example:

    \\192.0.2.0\39u21btystm8x1axizezb9a3lfnpzjho98evi3ij450i96vj0a8jpf36au26
  5. select the 'Drive' letter of any available drive you want to map the file system to.

  6. If needed, select the Connect using different credentials check box.

  7. Click Finish.

  8. When prompted, provide the user name and password of the AD domain user used for mapping the network drive.

  9. Click OK.

  10. In a Command Prompt window (cmd), verify that the drive is properly mapped using this command:

    C:\>net use
    New connections will be remembered.
    Status       Local     Remote                    Network
    -------------------------------------------------------------------------------
    OK           Z:        \\10.0.0.2\uvj1iw6ytyecqijcbdgpy7ec15mgsv044i7609giqx7ukfn6t2pwgfqot0ma
                                                    Microsoft Windows Network
    The command completed successfully.
    C:\>