What is Oracle Direct NFS? How To Enable It?

Oracle Direct NFS (dNFS) is a NFS (Network File System) client that provides faster and more scalable access to NFS storage located on NAS storage devices. A good guideline is to use Direct NFS when implementing NAS storage. Direct NFS is a new feature with 11g.

Direct NFS client needs root privileges to start communication with the NFS filer. It uses oradism to obtain the root file handle for the exported volume and the NFS server port and NFS mount port. Once the root handle and port information is obtained, all future communication is issued by Oracle user processes using normal privileges.

Set the ownership and suid to the oradism properly.

#chown root:root oradism

#chmod 4755 oradism

If you don’t set the ownership and suid to the oradism properly then you will get the below message in alert log file.

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

Direct NFS: please check that oradism is setuid

To enable Direct NFS, execute below commands;

cd $ORACLE_HOME/lib

mv libodm11.so libodm11.so_stub

ln -s libnfsodm11.so libodm11.so

You can also enable Direct NFS from 11g R2 onward;

cd $ORACLE_HOME/rdbms/lib

make -f ins_rdbms.mk dnfs_on

To disable Direct NFS;

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

After enabling dNFS, alert log shows Direct NFS client is enabled by checking the below message

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

Oracle Direct NFS uses a new configuration file to find out what mount points are available. This file may be one of the following files. Direct NFS searches for mount entries in the following order. One of the files is sufficient. These files must be identical on each node RAC environments.

1. $ORACLE_HOME/dbs/oranfstab
2. /etc/oranfstab
3. /etc/mtab

The example content of this file as following:

# vi /etc/oranfstab

server: zfs1

path:192.168.10.61

path:192.168.10.62

path:192.168.10.63

path:192.168.10.64

export: /export/clone01 mount: /zfssa/clone01

export: /export/clone02 mount: /zfssa/clone02

server: zfs2

path:192.168.10.65

path:192.168.10.66

path:192.168.10.67

path:192.168.10.68

export: /export/clone03 mount: /zfssa/clone03

export: /export/clone04 mount: /zfssa/clone04

If we briefly describe these fields;

server : NFS Server (You can write ip address or name of server)

path : IP address of NIC (Network Interface Card) of NFS server.Up to four you can write path definiton. Load distribution is performed automatically by Oracle.

export : Directory accessed with NFS

mount :Local directory on NFS client side.

And finally, we must add the following line to /etc/fstab file.

[root@zfsserver ~]# vi /etc/fstab
192.168.10.61:/export/clone01 /zfssa/clone01/ nfs rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,nfsvers=3,timeo=600 0 0

The mount options vary according to the operating system. The mount options can be determined according to  metalink documentation 359515.1

For Single Instance;

1single

For RAC,

2rac

We can use following dynamic views for Oracle Direct NFS.

v$dnfs_servers –  displays information about the Direct NFS servers accessed by Direct NFS

v$dnfs_files – displays information about the Oracle process files open through Direct NFS.

v$dnfs_channels – displays information about the Oracle process connections (channels) open to NFS servers.

v$dnfs_stats – displays information about the Oracle process NFS operation statistics issued by Direct NFS.

Talip Hakan Öztürk

Advertisement

One thought on “What is Oracle Direct NFS? How To Enable It?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s