zoukankan      html  css  js  c++  java
  • 使用11g DNFS建立基于DNFS的tablespace

    使用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> 
    
  • 相关阅读:
    JID 2.0 RC4 发布,高性能的 Java 序列化库
    FBReaderJ 1.6.3 发布,Android 电子书阅读器
    Arquillian 1.0.3.Final 发布,单元测试框架
    JavaScript 的宏扩展 Sweet.js
    Hypertable 0.9.6.5 发布,分布式数据库
    JRuby 1.7.0 发布,默认使用 Ruby 1.9 模式
    httppp 1.4.0 发布,HTTP响应时间监控
    Redis 2.6.0 正式版发布,高性能K/V服务器
    OfficeFloor 2.5.0 发布,IoC 框架
    XWiki 4.3 首个里程碑发布
  • 原文地址:https://www.cnblogs.com/yjbjingcha/p/6931633.html
Copyright © 2011-2022 走看看