Oracle database filesystem (DBFS) 簡單配置文檔

來源:互聯網
上載者:User

本機環境:11.2.0.1 

1. download fuse package on website

http://fuse.sourceforge.net/
download 2.7.4 版本

看一下需要的rpm包
rpm -q kernel-devel
kernel-devel-2.6.18-308.el5

2. 安裝fuse
tar -xzvf fuse-2.7.4.tar.gz

./configure
make 
make install


/sbin/depmod
/sbin/modprobe fuse
chmod 666 /dev/fuse
echo "/sbin/modprobe fuse" >> /etc/rc.modules

3. 伺服器端建立指令碼


SQL> create smallfile tablespace dbfsts 
  2  datafile '+JAMES' size 200m ;

SQL> create user dbfsusr identified by xiaojun default tablespace dbfsts quota unlimited on dbfsts ;

SQL>  grant create session, create table, create procedure, dbfs_role to dbfsusr;

SQL> conn dbfsusr/xiaojun
Connected.
create :

--fs1 會在在你用戶端的掛載點下面建立一個fs1 的檔案夾,並且會在dbfsusr使用者下建立一個名為t_fs1 的表
SQL> @$Oracle_HOME/rdbms/admin/dbfs_create_filesystem_advanced dbfsts fs1 nocompress nodeduplicate noencrypt non-partition

drop :
@$ORACLE_HOME/rdbms/admin/dbfs_drop_filesystem.sql  file system name

4. 用戶端配置:
建立檔案夾(保證許可權)
mkdir /u02

用戶端使用這個命令即可掛載:

dbfs_client dbfsusr@james /u02

或者
nohup dbfs_client dbfsusr@james /u02 < passwd.txt &

然後看一下

[oracle@oel1 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G  7.5G  6.3G  55% /
/dev/sda5             2.0G   36M  1.9G   2% /tmp
/dev/sda2              15G  8.4G  5.4G  61% /u01
tmpfs                 2.0G  367M  1.6G  19% /dev/shm
dbfs                  448K   27K  421K   7% /u02

[oracle@oel1 ~]$ cp /u01/fuse-2.7.4.tar.gz /u02/fs1/

[oracle@oel1 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G  7.5G  6.3G  55% /
/dev/sda5             2.0G   36M  1.9G   2% /tmp
/dev/sda2              15G  8.4G  5.4G  61% /u01
tmpfs                 2.0G  367M  1.6G  19% /dev/shm
dbfs                  1.5M  531K  941K  37% /u02

可以看到這個檔案系統是自動拓展的。
  • 1
  • 2
  • 下一頁

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.