DBFS and NFS over DBFS in Oracle Public Cloud Instances


Here we are a recipe for testing dbfs and dbfs exported as nfs.

dbfs setup

CONNECT / AS SYSDBA

ALTER SESSION SET container = pdb1;

CREATE TABLESPACE dbfs_ts DATAFILE '/u02/app/oracle/oradata/ORCL/dbfs01.dbf' SIZE 1M REUSE AUTOEXTEND ON NEXT 1M;

CREATE USER dbfsuser IDENTIFIED BY welcome1 DEFAULT TABLESPACE dbfs_ts QUOTA UNLIMITED ON dbfs_ts;

GRANT CREATE SESSION, RESOURCE, CREATE VIEW, DBFS_ROLE TO dbfsuser;

cd $ORACLE_HOME/rdbms/admin
sqlplus dbfsuser/welcome1@pdb1

SQL> @dbfs_create_filesystem.sql dbfs_ts staging_area
yum install kernel-devel

yum install fuse fuse-libs

mkdir /u02/dbfsmount

vi /etc/fuse.conf
# mount_max = 1000
 user_allow_other

dbfs on local database

dbfs_client dbfsuser@localhost:1521/pdb1.xxxxx.oraclecloud.internal -o allow_other /u02/dbfsmount/

Just in case you get issues take a look at http://www.hhutzler.de/blog/debugging-prolbems-when-mounting-a-dbfs

[root@wcsinteDB ~]# cd /usr/lib64/
[root@wcsinteDB lib64]# ln -s /usr/lib64/libfuse.so.2 libfuse.so
[root@wcsinteDB lib64]# ldconfig -p | grep fuse
 libfuse.so.2 (libc6,x86-64) => /usr/lib64/libfuse.so.2

nfs setup

vi /etc/exports
/u02/dbfsmount/staging_area x.y.z.t(rw,sync,fsid=0)

service nfs restart

mount nfs on remote machine

mount -v -t nfs4 x.y.z.t:/ /u01/nfsmounttest

dbfs on remote machine

same setup as dbfs on local database

remember you need to open 1521 port in host database to allow connection from remote dbfs client

simple test scripts

Execute this scripts or other created by you and make your own analysis and conclussions.

T1: very small files 1byte:
date > stats; for i in {1..1000}; do dd if=/dev/urandom of=${i}a.log bs=1 count=1; done; date >> stats; more stats; rm -f *
T2: small files 1Kbyte:
date > stats; for i in {1..1000}; do dd if=/dev/urandom of=${i}a.log bs=1k count=1; done; date >> stats; more stats; rm -f *
T3: discrete size files 10Mbyte:
date > stats; for i in {1..10}; do dd if=/dev/urandom of=${i}a.log bs=10M count=1; done; date >> stats; more stats; rm -f *
T4: discrete size files 100Mbyte:
date > stats; for i in {1..10}; do dd if=/dev/urandom of=${i}a.log bs=100M count=1; done; date >> stats; more stats; rm -f *
|TEST|DBFS LOCAL|DBFS REM|  NFS |
---------------------------------
| T1 |    5     |    7   |   8  |
| T2 |    5     |    8   |   9  |
| T3 |   14     |   16   |  15  |
| T4 |   49     |   62   |      |

enjoy 😉

 

 

IT

javier mugueta View All →

Me and my circumstance

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: