oracle_12c_enable_nfs_direct

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
oracle_12c_enable_nfs_direct [2019/03/27 12:25] – created andonovjoracle_12c_enable_nfs_direct [2019/10/18 20:04] (current) – external edit 127.0.0.1
Line 1: Line 1:
-===Overview===+====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. 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.
  
Line 5: Line 5:
  
  
-===Implementation===+====Implementation====
 Direct NFS is fairly easy to implement. Since it searched for the default location for NFS information: Direct NFS is fairly easy to implement. Since it searched for the default location for NFS information:
 +
 /etc/mtab /etc/mtab
 +
 /etc/fstab /etc/fstab
 +
 /etc/oranfstab /etc/oranfstab
  
Line 14: Line 17:
 P.S. Bear in mind that the oranfstab has different configuration syntax than the usual /etc/fstab: P.S. Bear in mind that the oranfstab has different configuration syntax than the usual /etc/fstab:
 <sxh bash> <sxh bash>
-server: MyNFSserver1 +server: TAURUS 
-path192.168.1.1 +local IP_NFS_SERVER 
-path: 192.168.1.2 +path:  IP_DEST_SERVER 
-export: /vol/oradata1 mount: /mnt/oradata1+export: /be_ora_logs mount: /backup
 </sxh> </sxh>
  
Line 32: Line 35:
 cd $ORACLE_HOME/rdbms/lib cd $ORACLE_HOME/rdbms/lib
 make -f ins_rdbms.mk dnfs_off make -f ins_rdbms.mk dnfs_off
 +</sxh>
 +
 +After you have enabled the NFS, a message in the alert log should be displayed:
 +<sxh bash>
 +Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 4.0
 +</sxh>
 +
 +
 +====Possible troubles====
 +By default, Windows "blocks" writes by NFS direct....not so smart, so check that from windows as follows:
 +<sxh bash>
 +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,server1,server2
 +
 +PS C:\Windows\system32>
 +</sxh>
 +
 +If you change it to "0", should be fine:
 +
 +<sxh bash>
 +PS C:\Users\Administrator> reg add HKLM\Software\Microsoft\ServerForNFS\CurrentVersion\Exports\0 /v RestrictChown /t REG_DWORD /d 0
 +</sxh>
 +
 +==Verify==
 +
 +<sxh bash>
 +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,server1,server2
 +</sxh>
 +
 +After that, restart the NFS service and all should be running normally :) 
 +
 +====Verify====
 +You can verify if the NFS driver has been configured as follows:
 +
 +
 +<sxh bash>
 +SQL> select * from v$dnfs_servers;
 +
 +        ID SVRNAME              DIRNAME            MNTPORT    NFSPORT NFSVERSION            WTMAX      RTMAX     CON_ID RDMAENABLE   RDMAPORT SECURITY
 +---------- -------------------- --------------- ---------- ---------- ---------------- ---------- ---------- ---------- ---------- ---------- ----------
 +         1 10.200.15.30         /be_ora_logs          2049       2049 NFSv3.0               32768      32768          0 No                  0 sys
 +SQL>
 +
 +</sxh>
 +
 +That shows us that the NFS is configured on server: 10.200.15.30 on this partition: /be_ora_logs
 +
 +You can also verify if the NFS is ACTUALLY used during a backup. You should be able to observe the following output:
 +
 +<sxh bash>
 +SQL> select CH_ID, SVR_ID, SENDS, RECVS, PINGS from v$dnfs_channels;
 +
 +     CH_ID     SVR_ID      SENDS      RECVS      PINGS
 +---------- ---------- ---------- ---------- ----------
 +                  2        366        608          0
 +
 </sxh> </sxh>
  • oracle_12c_enable_nfs_direct.1553689520.txt.gz
  • Last modified: 2019/10/18 20:04
  • (external edit)