This is an old revision of the document!


Overview

It is public knowledge that NFS is SLOW solution for Oracle in any way. Even though it is a supported option for Oracle RAC, it is VERY BAD idea, because of the over caching and the fact that Oracle will have to use the default system driver to send it commands and requests.

Thankfully, there is a solution for that called NFS Direct, which bypasses the default NFS driver and issues direct requests to the NFS. Direct NFS provides faster performance than what can be provided by the operating system's NFS driver as Oracle bypasses the operating system and generates exactly the requests it needs (no user configuration or tuning required). Data is cached just once in user space, which saves memory (no second copy in kernel space). Performance is further improved by load balancing across multiple network interfaces (if available).

Implementation

Direct NFS is fairly easy to implement. Since it searched for the default location for NFS information: /etc/mtab /etc/fstab /etc/oranfstab

Oracle needs to find the NFS in at least one of these files. P.S. Bear in mind that the oranfstab has different configuration syntax than the usual /etc/fstab:

server: MyNFSserver1
path: 192.168.1.1
path: 192.168.1.2
export: /vol/oradata1 mount: /mnt/oradata1

To enable the Direct NFS after that is very easy:

Enable

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk dnfs_on

Disable

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk dnfs_off

After you have enabled the NFS, a message in the alert log should be displayed:

Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 4.0

Possible troubles

By default, Windows “blocks” writes by NFS direct….not so smart, so check that from windows as follows:

PS C:\Windows\system32> reg query HKLM\Software\Microsoft\ServerForNFS\CurrentVersion\Exports /s

HKEY_LOCAL_MACHINE\Software\Microsoft\ServerForNFS\CurrentVersion\Exports\0
    Path    REG_SZ    F:\be_ora_logs
    Alias    REG_SZ    be_ora_logs
    GlobalPerm    REG_DWORD    0x1
    AllowAnonymousAccess    REG_DWORD    0x2
    RestrictChown    REG_DWORD    0x1     <- This little fellow.
    SymbolicLinks    REG_DWORD    0x1
    TruncateNames    REG_DWORD    0x0
    UnmappedUID    REG_DWORD    0xfffffffe
    UnmappedGID    REG_DWORD    0xfffffffe
    Encoding    REG_DWORD    0x7
    SecurityFlavors    REG_DWORD    0x2
    NumClients    REG_DWORD    0x5
    Clients    REG_SZ    N,matar.izb.local,10.200.11.75,4,7,N,naos.izb.local,10.200.11.73,4,7,N,oraprod.izb.local,10.200
.11.151,4,7,N,oraback.izb.local,10.200.11.161,4,7,N,tejat.izb.local,10.200.11.70,4,7,

PS C:\Windows\system32>

If you change it to “0”, should be fine:

PS C:\Users\Administrator> reg add HKLM\Software\Microsoft\ServerForNFS\CurrentVersion\Exports\0 /v RestrictChown /t REG_DWORD /d 0

Verify

PS C:\Windows\system32> reg query HKLM\Software\Microsoft\ServerForNFS\CurrentVersion\Exports /s

HKEY_LOCAL_MACHINE\Software\Microsoft\ServerForNFS\CurrentVersion\Exports\0
    Path    REG_SZ    F:\be_ora_logs
    Alias    REG_SZ    be_ora_logs
    GlobalPerm    REG_DWORD    0x1
    AllowAnonymousAccess    REG_DWORD    0x2
    RestrictChown    REG_DWORD    0x0     <- Fixed
    SymbolicLinks    REG_DWORD    0x1
    TruncateNames    REG_DWORD    0x0
    UnmappedUID    REG_DWORD    0xfffffffe
    UnmappedGID    REG_DWORD    0xfffffffe
    Encoding    REG_DWORD    0x7
    SecurityFlavors    REG_DWORD    0x2
    NumClients    REG_DWORD    0x5
    Clients    REG_SZ    N,matar.izb.local,10.200.11.75,4,7,N,naos.izb.local,10.200.11.73,4,7,N,oraprod.izb.local,10.200
.11.151,4,7,N,oraback.izb.local,10.200.11.161,4,7,N,tejat.izb.local,10.200.11.70,4,7,

  • oracle_12c_enable_nfs_direct.1553709430.txt.gz
  • Last modified: 2019/10/18 20:04
  • (external edit)