Create a DNFS-based tablespace using 11gDNFS
Create a DNFS-based tablespace using 11g DNFS
Reference:
Step by Step-Configure Direct NFS Client (DNFS) on Linux (11g) (Document ID 762374.1)
Note:
The IP address of the Host Name p18 is 192.168.80.18, which is the nfs server.
Nfs client whose host name is test179
The procedure is as follows:
1. operations on the nfs server:
[root@p18 ~]# service nfs statusrpc.mountd is stoppednfsd is stoppedrpc.rquotad is stopped[root@p18 ~]# mkdir -p /u02/nfsdata[root@p18 ~]# chown oracle:oinstall /u02/nfsdata[root@p18 ~]# ls -ld /u02/nfsdata/drwxr-xr-x 2 oracle oinstall 4096 Aug 17 07:22 /u02/nfsdata/
2. operations on the nfs server:
[root@p18 nfsdata]# cat /etc/exports /u02/nfsdata *(rw,sync,all_squash,anonuid=500,anongid=502)[root@p18 nfsdata]#
Iii. operations on the nfs server:
[root@p18 ~]# chkconfig --level 345 nfs on
4. Start nfs server:
[root@p18 ~]# service nfs startStarting NFS services: [ OK ]Starting NFS quotas: [ OK ]Starting NFS daemon: [ OK ]Starting NFS mountd: [ OK ][root@p18 ~]# exportfs -v/u02/nfsdata
(rw,wdelay,root_squash,all_squash,no_subtree_check,anonuid=500,anongid=502)
5. Operate on nfs client:
[root@test179 ~]# mkdir -p /u02/nfsdata[root@test179 ~]# ls -ld /u02/nfsdatadrwxr-xr-x 2 root root 4096 Aug 17 07:27 /u02/nfsdata[root@test179 ~]# cat /etc/fstabLABEL=/ / ext3 defaults 1 1LABEL=/boot /boot ext3 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0LABEL=SWAP-sda2 swap swap defaults 0 0192.168.80.18:/u02/nfsdata /u02/nfsdata nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 0 0[root@test179 ~]# [root@test179 ~]# mount /u02/nfsdata[root@test179 ~]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 55G 18G 35G 34% //dev/sda1 190M 12M 170M 7% /boottmpfs 1014M 0 1014M 0% /dev/shm/dev/hdc 2.8G 2.8G 0 100% /media/Enterprise Linux dvd 20090908192.168.80.18:/u02/nfsdata 55G 12G 40G 24% /u02/nfsdata[root@test179 ~]# [root@test179 ~]# cd /u02/nfsdata[root@test179 nfsdata]# ls -lrttotal 0[root@test179 nfsdata]# touch testfile[root@test179 nfsdata]# ls -lrttotal 0-rw-r--r-- 1 oracle oinstall 0 Aug 17 07:32 testfile[oracle@test179 ~]$ cd /u01/app/oracle/product/11.1.0/db_1/dbs/[oracle@test179 dbs]$ cat oranfstab server: 192.168.80.18path: 192.168.80.18local: 192.168.80.179export: /u02/nfsdata mount: /u02/nfsdata[oracle@test179 db_1]$ cd lib/[oracle@test179 lib]$ ls -lrt | grep odm-rw-r--r-- 1 oracle oinstall 8905 Sep 10 2008 libodmd11.so-rw-r--r-- 1 oracle oinstall 44730 Sep 10 2008 libnfsodm11.solrwxrwxrwx 1 oracle oinstall 12 Jul 11 13:26 libodm11.so -> libodmd11.so[oracle@test179 lib]$ mv libodm11.so libodm11.so_bak[oracle@test179 lib]$ ln -s libnfsodm11.so libodm11.so[oracle@test179 lib]$ ls -l libnfsodm11.so -rw-r--r-- 1 oracle oinstall 44730 Sep 10 2008 libnfsodm11.so[oracle@test179 lib]$ ls -l libodm11.so lrwxrwxrwx 1 oracle oinstall 14 Aug 17 07:37 libodm11.so -> libnfsodm11.so[oracle@test179 lib]$
First, restart the database instance and create a dnfs-based tablespace. The following will not post the restart process, but will directly post the table space creation process.
[oracle@test179 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.1.0.7.0 - Production on Mon Aug 17 07:43:08 2015Copyright (c) 1982, 2008, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> create tablespace nfs_tbs datafile '/u02/nfsdata/nfs_tbs01.dbf' size 30m;Tablespace created.SQL>