rasti.hil@hilandco.com +41 79 367-9677

Monday, 11 October 2010

The Oracle Database File System (DBFS) and Samba (SMB)

Install Samba
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo
yum install samba

Manual FUSE Installation

Download the FUSE 2.8.5 package from http://fuse.sourceforge.net/.

Determine the kernel directory.
# echo /usr/src/kernels/`uname -r`-`uname -p`
/usr/src/kernels/2.6.18-128.el5-x86_64
#
Install the FUSE package as the "root" user using the following commands, substituting your kernel directory.
# tar -xzvf fuse-2.8.5.tar.gz
# cd fuse-2.8.5
# ./configure --prefix=/usr --with-kernel=/usr/src/kernels/2.6.18-128.el5-x86_64
# make
# make install
# /sbin/depmod
# /sbin/modprobe fuse
# chmod 666 /dev/fuse
# echo "/sbin/modprobe fuse" >> /etc/rc.modules
# chmod 700 /etc/rc.modules

Create DBFS File System

create user dbfs identified by dbfs default tablespace users quota unlimited on users;

grant dbfs_role to dbfs;
grant create session to dbfs;
grant create procedure to dbfs;
grant create table ro dbfs;
alter user dbfs default role all;

Create a simple file system

cd $ORACLE_HOME/rdbms/admin
sqlplus dbfs/dbfs @dbfs_create_filesystem.sql USERS SAMBADBFS

Create a mount point
mkdir /smbdbfs
chown oracle:oinstall /smbdbfs

Configure fuse
echo user_allow_other > /etc/fuse.conf

Mount File System

export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/db_1/lib
dbfs_client dbfs@localhost:1521/odmdb -o allow_root /smbdbfs <>

Configure Samba
smbpasswd -a oracle

vi /etc/samba/smb.conf

[global]
security = user
encrypt passwords = Yes
username map = /etc/samba/smbusers

[smbdbfs]
path = /smbdbfs
writeable = true
username = oracle

/etc/init.d/smb restart

Windows Map Drive
net use t: \\server\smbdbfs password /USER:oracle




1 comment:

Mahesh Nayak said...

Hey can you just tel me whether it is possible to implement the same using Mysql??? I don't want to use ORACLE!!