Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
oracle_dbfs [2020/11/03 15:46] – andonovj | oracle_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/ | ||
< | < | ||
+ | --Mount | ||
[oracle@ol6-121-rac1 admin]$ id | [oracle@ol6-121-rac1 admin]$ id | ||
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall), | uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall), | ||
Line 195: | Line 197: | ||
install | install | ||
dbfs-dbfs_user@:/ | dbfs-dbfs_user@:/ | ||
+ | [oracle@ol6-121-rac1 admin]$ | ||
+ | |||
+ | --Unmount | ||
+ | [oracle@ol6-121-rac1 admin]$ / | ||
+ | unmounting DBFS from / | ||
+ | umounting the filesystem using '/ | ||
+ | Stop - stopped, now not mounted | ||
+ | [oracle@ol6-121-rac1 admin]$ df -h | ||
+ | Filesystem | ||
+ | / | ||
+ | | ||
+ | tmpfs | ||
+ | / | ||
+ | install | ||
[oracle@ol6-121-rac1 admin]$ | [oracle@ol6-121-rac1 admin]$ | ||
</ | </ | ||
+ | |||
+ | ====Register DBFS into Grid Infra==== | ||
+ | We can register the DBFS into Grid infra and though allow failover if the instance crashes: | ||
+ | |||
+ | < | ||
+ | [OS prompt]$ cp / | ||
+ | [OS prompt]$ cd ~ | ||
+ | [OS prompt]$ chmod +x add-dbfs-resource.sh | ||
+ | [OS prompt]$ cat add-dbfs-resource.sh | ||
+ | [oracle@ol6-121-rac1 ~]$ ./ | ||
+ | [oracle@ol6-121-rac1 ~]$ grid_env | ||
+ | [oracle@ol6-121-rac1 ~]$ crsctl stat res dbfs_mount | ||
+ | NAME=dbfs_mount | ||
+ | TYPE=local_resource | ||
+ | TARGET=OFFLINE, | ||
+ | STATE=OFFLINE, | ||
+ | [oracle@ol6-121-rac1 ~]$ crsctl start res dbfs_mount | ||
+ | CRS-2672: Attempting to start ' | ||
+ | CRS-2672: Attempting to start ' | ||
+ | CRS-2676: Start of ' | ||
+ | CRS-2676: Start of ' | ||
+ | [oracle@ol6-121-rac1 ~]$ crsctl stat res dbfs_mount | ||
+ | NAME=dbfs_mount | ||
+ | TYPE=local_resource | ||
+ | TARGET=ONLINE | ||
+ | STATE=ONLINE on ol6-121-rac1, | ||
+ | </ | ||
+ | |||
Line 202: | Line 246: | ||
Below you can find the script we have used. | Below you can find the script we have used. | ||
- | < | + | < |
- | [root@ol6-121-rac1 script]# cat / | + | |
#!/bin/bash | #!/bin/bash | ||
Line 642: | Line 685: | ||
esac | esac | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ##### start script add-dbfs-resource.sh | ||
+ | #!/bin/bash | ||
+ | ACTION_SCRIPT=/ | ||
+ | RESNAME=dbfs_mount | ||
+ | DBNAME=OGGRAC | ||
+ | DBNAMEL=`echo $DBNAME | tr A-Z a-z` | ||
+ | ORACLE_HOME=/ | ||
+ | PATH=$ORACLE_HOME/ | ||
+ | export PATH ORACLE_HOME | ||
+ | crsctl add resource $RESNAME \ | ||
+ | -type local_resource \ | ||
+ | -attr " | ||
+ | CHECK_INTERVAL=30, | ||
+ | START_DEPENDENCIES=' | ||
+ | ',\ | ||
+ | STOP_DEPENDENCIES=' | ||
+ | SCRIPT_TIMEOUT=300" | ||
+ | ##### end script add-dbfs-resource.sh | ||
</ | </ |