Using DNFS for test purposes

Because of other priorities such as bringing the first v2 Database Machine in the Netherlands into production I did spend less time on my blog that planned. I do however like to tell some things about DNFS, the build-in NFS client we have in Oracle RDBMS since 11.1. What DNFS is and how to set it up can all be found here . As you see this documentation is actually the "Clusterware Installation Guide". I think that is weird, I would expect this to be part of the Admin Guide, especially the "Tablespace" chapter. I do however want to show what I did not find in the documentation that quickly (and solved after talking to my famous colleague "the prutser"):

First, a quick setup:
1. The standard ODM library needs to be replaced with the NFS ODM library:
[oracle@rkdb01 ~]$ cp $ORACLE_HOME/lib/libodm11.so $ORACLE_HOME/lib/libodm11.so_stub
[oracle@rkdb01 ~]$ ln -s $ORACLE_HOME/lib/libnfsodm11.so $ORACLE_HOME/lib/libodm11.so
After changing to this library you will notice the following in your alert.log:
Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 2.0
2. The intention is to mount the datafiles over normal NAS (like NetApp). But, in case you want to test yourself and use an exported NFS filesystem, it should look like the following:
   [oracle@rkdb01 ~]$ cat /etc/exports 
   /u01/scratch/nfs        *(rw,sync,insecure)
Please note the "insecure" option in the export, since you will not be able to use DNFS without it if you export a filesystem from a host. Without the "insecure" option the NFS server considers the port used by the database "insecure" and the database is unable to acquire the mount. This is what you will see in the alert.log creating the file:
     Direct NFS: NFS3ERR 1 Not owner. path rkdb01.nl.oracle.com mntport 930 nfsport 2049
3. Before configuring the new Oracle stanza for DNFS we still need to configure a regular kernel NFS mount:
[root@rkdb01 ~]# cat /etc/fstab | grep nfs
rkdb01.nl.oracle.com:/u01/scratch/nfs  /incoming  nfs  rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,actimeo=0,vers=3,timeo=600
4. Then a so called Oracle-'nfstab' needs to be created that specifies what the available exports to use:
[oracle@rkdb01 ~]$ cat /etc/oranfstab 
server:rkdb01.nl.oracle.com
path:192.168.1.40
export:/u01/scratch/nfs mount:/incoming
5. Creating a tablespace with a datafile on the NFS location:
SQL> create tablespace rk datafile '/incoming/rk.dbf' size 10M;
Tablespace created.
As said, be sure to know that it may happen that if you do not specify the insecure option (like I did) you will still see output from the query v$dnfs_servers:
SQL> select * from v$dnfs_servers;

ID SVRNAME              DIRNAME           MNTPORT   NFSPORT    WTMAX   RTMAX
-- -------------------- ----------------- --------- ---------- ------  ------
1  rkdb01.nl.oracle.com  /u01/scratch/nfs  684       2049       32768   32768
But, querying v$dnfsfiles and v$dnfs_channels will not return any result, and indeed, you will see the following message in the alert-log when you create a file :
     
      Direct NFS: NFS3ERR 1 Not owner. path rkdb01.nl.oracle.com mntport 930 nfsport 2049
After correcting the export with the "secure" option:
SQL> select * from v$dnfs_files;

FILENAME         FILESIZE PNUM    SVR_ID
---------------  -------- ------  ------ 
/incoming/rk.dbf 10493952 20      1  
Rene Kundersma Oracle Technology Services, The Netherlands
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Blog of Rene Kundersma, Principal Member of Technical Staff at Oracle Development USA. I am designing and evaluating solutions and best practices around database MAA focused on Exadata. This involves HA, backup/recovery, migration and database consolidation and upgrades on Exadata. Opinions are my own and not necessarily those of Oracle Corporation. See http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today