使用11g DNFS建立基于DNFS的tablespace

參考自:

Step by Step - Configure Direct NFS Client (DNFS) on Linux (11g) (文档 ID 762374.1)

注意:

主机名p18的ip地址为192.168.80.18,是nfs的server

主机名为test179的为nfs的client

例如以下时操作过程:

一、在nfs server上的操作:

[root@p18 ~]# service nfs status
rpc.mountd is stopped
nfsd is stopped
rpc.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/

二、在nfs server上的操作:

[root@p18 nfsdata]# cat /etc/exports
/u02/nfsdata *(rw,sync,all_squash,anonuid=500,anongid=502)
[root@p18 nfsdata]#

三、在nfs server上的操作:

[root@p18 ~]# chkconfig --level 345 nfs on

四、启动nfs server:

[root@p18 ~]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
[root@p18 ~]# exportfs -v
/u02/nfsdata <world>(rw,wdelay,root_squash,all_squash,no_subtree_check,anonuid=500,anongid=502)

五、在nfs client上操作:

[root@test179 ~]# mkdir -p /u02/nfsdata
[root@test179 ~]# ls -ld /u02/nfsdata
drwxr-xr-x 2 root root 4096 Aug 17 07:27 /u02/nfsdata [root@test179 ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
192.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 -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 55G 18G 35G 34% /
/dev/sda1 190M 12M 170M 7% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
/dev/hdc 2.8G 2.8G 0 100% /media/Enterprise Linux dvd 20090908
192.168.80.18:/u02/nfsdata
55G 12G 40G 24% /u02/nfsdata
[root@test179 ~]# [root@test179 ~]# cd /u02/nfsdata
[root@test179 nfsdata]# ls -lrt
total 0
[root@test179 nfsdata]# touch testfile
[root@test179 nfsdata]# ls -lrt
total 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.18
path: 192.168.80.18
local: 192.168.80.179
export: /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.so
lrwxrwxrwx 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]$

先重新启动数据库实例。建立基于dnfs的tablespace,以下就不贴出重新启动的过程了,直接贴出建立表空间的过程。

[oracle@test179 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Mon Aug 17 07:43:08 2015

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> create tablespace nfs_tbs datafile '/u02/nfsdata/nfs_tbs01.dbf' size 30m; Tablespace created. SQL>

最新文章

  1. 《Ext JS模板与组件基本知识框架图----模板》
  2. CSS3--box-shadow
  3. spring boot 学习笔记(二) 构建web支持jsp
  4. PHP加密3DES报错 Call to undefined function: mcrypt_module_open() 的解决方法
  5. WPF之DataGrid
  6. [Bug]当IDENTITY_INSERT设置为OFF时,不能为表“xx”中的标识列插入显示的值
  7. 解决mysqldump: Got error: 1044: Access denied for user
  8. 66.为什么有时候在ISE软件中,顶层文件不能置顶?
  9. vue中数据双向绑定的实现原理
  10. 负载均衡手段之DNS轮询
  11. PostgreSQL:Java使用CopyManager实现客户端文件COPY导入
  12. Linux下C语言的socket网络编程
  13. git 用远程覆盖本地
  14. Python使用MySQL数据库(新)(转)
  15. 重新学习Servlet二
  16. 几种常见NPE
  17. 通过Intent传递对象
  18. Python将某文件夹及其子文件夹下某种格式的文件移动到另一个指定的文件下
  19. js中对话框的使用
  20. Markdown github 风格语法

热门文章

  1. laravel easywechat服务器故障问题
  2. CV方向:纽劢科技,复星,蚂蚁金服,哈喽出行,海康威视
  3. Log4j 配置某个类中某个方法的输出日志到指定文件
  4. Windows下如何使用CMD命令进入MySQL数据库
  5. JAVA基础——生产者消费者问题
  6. How To: IDENTIFY THE ASM DEVICE FROM ASMLIB
  7. linux通用makefile文件
  8. 笔试算法题(42):线段树(区间树,Interval Tree)
  9. mysql You can&#39;t specify target table &#39;sys_org_relation&#39; for update in FROM clause 删除表条件不能直接包含该表
  10. ZOJ 3905 Cake