oracle_dbfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
oracle_dbfs [2020/11/03 15:46] andonovjoracle_dbfs [2020/11/03 16:08] (current) andonovj
Line 9: Line 9:
   - Edit FUSE config (that is the config file for the FUSE package needed for the DBFS.   - Edit FUSE config (that is the config file for the FUSE package needed for the DBFS.
   - Create folder (owned under oracle user and dba group)   - Create folder (owned under oracle user and dba group)
-  - Create a tablespace which will be registered with the DBFS (that tablespace won't reside on the DBFS, but it is needed for configuration)+  - Create a tablespace which will host the DBFS 
   - Create user with the necessary permission   - Create user with the necessary permission
   - Create the DBFS env on the database   - Create the DBFS env on the database
Line 172: Line 172:
  
 =====Management===== =====Management=====
-Finally we can start it as follows:+The management of DBFS, includes, stop/start and registartion in the Grid Infra:
  
 +====Start/Stop====
 <Code:bash|Start DBFS> <Code:bash|Start DBFS>
 +--Mount
 [oracle@ol6-121-rac1 admin]$ id [oracle@ol6-121-rac1 admin]$ id
 uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),492(vboxsf),54322(dba) uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),492(vboxsf),54322(dba)
Line 195: Line 197:
 install               402G  190G  212G  48% /media/sf_install install               402G  190G  212G  48% /media/sf_install
 dbfs-dbfs_user@:/     3.0G  120K  3.0G   1% /oracle/dbfs_direct dbfs-dbfs_user@:/     3.0G  120K  3.0G   1% /oracle/dbfs_direct
 +[oracle@ol6-121-rac1 admin]$ 
 +
 +--Unmount
 +[oracle@ol6-121-rac1 admin]$ /u01/app/12.1.0.2/grid/crs/script/mount-dbfs.sh stop
 +unmounting DBFS from /oracle/dbfs_direct
 +umounting the filesystem using '/bin/fusermount -u /oracle/dbfs_direct'
 +Stop - stopped, now not mounted
 +[oracle@ol6-121-rac1 admin]$ df -h
 +Filesystem            Size  Used Avail Use% Mounted on
 +/dev/mapper/vg_ol6121rac1-lv_root
 +                       46G   19G   25G  43% /
 +tmpfs                 1.9G  628M  1.2G  34% /dev/shm
 +/dev/sda1             477M   66M  382M  15% /boot
 +install               402G  190G  212G  48% /media/sf_install
 [oracle@ol6-121-rac1 admin]$  [oracle@ol6-121-rac1 admin]$ 
 </Code> </Code>
 +
 +====Register DBFS into Grid Infra====
 +We can register the DBFS into Grid infra and though allow failover if the instance crashes:
 +
 +<Code:bash|Register DBFS into Grid Infra>
 +[OS prompt]$ cp /media/sf_install/add-dbfs-resource.sh ~
 +[OS prompt]$ cd ~
 +[OS prompt]$ chmod +x add-dbfs-resource.sh
 +[OS prompt]$ cat add-dbfs-resource.sh
 +[oracle@ol6-121-rac1 ~]$ ./add-dbfs-resource.sh
 +[oracle@ol6-121-rac1 ~]$ grid_env
 +[oracle@ol6-121-rac1 ~]$ crsctl stat res dbfs_mount
 +NAME=dbfs_mount
 +TYPE=local_resource
 +TARGET=OFFLINE, OFFLINE
 +STATE=OFFLINE, OFFLINE
 +[oracle@ol6-121-rac1 ~]$ crsctl start res dbfs_mount
 +CRS-2672: Attempting to start 'dbfs_mount' on 'ol6-121-rac1'
 +CRS-2672: Attempting to start 'dbfs_mount' on 'ol6-121-rac2'
 +CRS-2676: Start of 'dbfs_mount' on 'ol6-121-rac2' succeeded
 +CRS-2676: Start of 'dbfs_mount' on 'ol6-121-rac1' succeeded
 +[oracle@ol6-121-rac1 ~]$ crsctl stat res dbfs_mount
 +NAME=dbfs_mount
 +TYPE=local_resource
 +TARGET=ONLINE                , ONLINE
 +STATE=ONLINE on ol6-121-rac1, ONLINE on ol6-121-rac2
 +</Code>
 +
  
  
Line 202: Line 246:
 Below you can find the script we have used. Below you can find the script we have used.
  
-<Code:bash|Mount dbfs.sh> +<Code:bash|mount-dbfs.sh>
-[root@ol6-121-rac1 script]# cat /media/sf_install/mount-dbfs.sh+
 #!/bin/bash #!/bin/bash
  
Line 642: Line 685:
  
 esac esac
 +</Code>
 +
 +<Code:bash|add-dbfs-resource.sh>
 +##### start script add-dbfs-resource.sh
 +#!/bin/bash
 +ACTION_SCRIPT=/u01/app/12.1.0.2/grid/crs/script/mount-dbfs.sh
 +RESNAME=dbfs_mount
 +DBNAME=OGGRAC
 +DBNAMEL=`echo $DBNAME | tr A-Z a-z`
 +ORACLE_HOME=/u01/app/12.1.0.2/grid
 +PATH=$ORACLE_HOME/bin:$PATH
 +export PATH ORACLE_HOME
 +crsctl add resource $RESNAME \
 +-type local_resource \
 +-attr "ACTION_SCRIPT=$ACTION_SCRIPT, \
 +CHECK_INTERVAL=30,RESTART_ATTEMPTS=10, \
 +START_DEPENDENCIES='hard(ora.$DBNAMEL.db)pullup(ora.$DBNAMEL.db)
 +',\
 +STOP_DEPENDENCIES='hard(ora.$DBNAMEL.db)',\
 +SCRIPT_TIMEOUT=300"
 +##### end script add-dbfs-resource.sh
 </Code> </Code>
  • oracle_dbfs.1604418395.txt.gz
  • Last modified: 2020/11/03 15:46
  • by andonovj