The direct NFS client looks for mount
settings in the following order:
-
$ORACLE_HOME/dbs/oranfstab
for settings on a single database
-
/etc/oranfstab for NFS mounts available to all
Oracle databases on the host
-
Lastly, the mount tab file (i.e.
/etc/mtab
on Linux) to determine available NFS mounts
The oranfstab file should be created to
include the server, path, export (path), and mount.
For example, one possible contents of this file could be:
server: MyServer
path: 135.34.28.11
path: 135.34.28.12
export: /vol/oradata mount:
C:\oracle\11g\oradata\ora11gr1
Server - NFS server name
Path - Up to four network paths to the NFS server
Export - Exported path from the NFS server
Mount - Local mount point for NFS server
Prior to enabling the direct NFS client,
the NFS file systems should already be mounted and available
over regular NFS mounts. Once the NFS file systems are
mounted, it is necessary to replace the standard Oracle Disk
Manager (ODM) library with one that supports the direct NFS
client. This can be accomplished by issuing the
following commands on the server:
>
cd $ORACLE_HOME/lib
> cp libodm11.so libodm11.so_stub
> ln 's libnfsodm11.so libodm11.so
These commands create a copy of the ODM
library. They also create a symbolic link between the ODM
library that supports the direct NFS client and old ODM
library.
Monitor Direct NFS
Oracle 11g has introduced several new
dynamic views to provide visibility on the configuration and
performance of direct NFS in the database.
-
v$dnfs_servers - View servers accessed using Direct
NFS
-
v$dnfs_files - View files currently open using
Direct NFS
-
v$dnfs_channels - View open network paths or
channels to servers for which Direct NFS is providing
files
-
v$dnfs_stats - View performance statistics for
Direct NFS
Direct NFS in OLTP and DSS
Case studies from Oracle demonstrate
that the direct NFS client provides a significant
improvement over the kernel NFS for throughput and CPU
utilization in both DSS and OLTP environments. In DSS
environments, the improvement increases dramatically as
additional network interfaces are added. Oracle's case
study shows an approximately 40% improvement in DSS
environments and an 11% improvement in OLTP environments.
These metrics are only one element of the full benefits of
using the direct NFS client rather than the kernel NFS.
Other factors that should be considered when evaluating this
feature include the simplicity of setup, maintenance, and
the reduced infrastructure requirements.
RAC Using
NFS with Direct NFS (DNFS)
Oracle 11g comes with enhanced support for Oracle over
NFS using the new Direct NFS feature. Direct NFS allows
for costs savings by sticking with one connection model:
the network. This allows for multipathing and unified
storage. In addition, Direct NFS even works in Windows,
even though Windows has no NFS support. Another nice
feature of NFS is that files are directly accessible via
standard OS commands like ls, mv, cp and such.
Lastly, Oracle's Direct NFS feature allows for Direct
I/O and Asynchronous I/O by default. To use Direct NFS,
the client must be installed on RAC nodes. This can even
be performed on nodes where Oracle RAC is already running.
The Oracle 11g Direct NFS Client is shipped with Oracle
11g. Once installed, it is very simple to put it in
place:
- Stop any RAC databases
- Navigate to
$ORACLE_HOME/lib
- Move the libodm11.so file to a backup
- Create a symbolic link called libodm11.so
which uses libnfsodm11.so as its
source:
ln -s libfsodm11.so libodm11.so
- Start the RAC databases
Direct NFS information can then be queried from the
following fixed views:
Note: Oracle 11g Direct NFS only works with NFS V3
compatible NAS devices.
NFS must be set up at the
OS level before using the Direct NFS client. Each OS has
different requirements for configuring and using NFS.