Logo ← PostgreSQL Blog

Disk Layouts

Before installing the Oracle database software for the first time, it’s crucial to plan our disk layout strategy. In this article, we’ll…

Disk Layouts

Before installing the Oracle database software for the first time, it’s crucial to plan our disk layout strategy. In this article, we’ll discuss Oracle’s Optimal Flexible Architecture (OFA) and then provide general guidelines on where to place your database on disk.

Optimal Flexible Architecture
Optimal Flexible Architecture (OFA) is a set of guidelines provided by Oracle Corporation to help us determine where to place Oracle's files on disk. This includes database files, Oracle software files, and any trace files.

Keep in mind that OFA provides guidelines, not strict rules. You're not obligated to follow them. For a quick and straightforward setup of Oracle, typically for a personal test environment, you might choose to overlook these guidelines. However, if you plan to use your Oracle installation for development, testing, or production purposes, it's advisable to follow the OFA guidelines as a best practice.

Diagnostic Files
Diagnostic files are located in the $ORACLE_BASE/diag directory. The subsequent subdirectory indicates the type of diagnostic files. If you're not running Oracle Real Application Clusters (RAC), the location might look something like: $ORACLE_BASE/diag/rdbms/orcl/orcl. In this example, our database name is orcl.

Database Files
The OFA guidelines suggest storing database files in $ORACLE_BASE/oradata/db_name as a starting point. If your database is intended for anything other than a test environment, the disk allocated for ORACLE_BASE might not be sufficient to hold all the files. It's quite common for a Database Administrator (DBA) to distribute database files across different disk locations for various reasons.

Full Picture
We'll be installing the Oracle database software on our Linux machine and creating our first database. Now that we've reached the end of this article, we have a clearer understanding of where things will be located on our server. Below are the file locations on our test environment that we'll be using.

Directory Structure
Directory Path - Contents
/u01/app/oracle - ORACLE_BASE
/u01/app/oracle/oraInventory - Oracle Inventory
/u01/app/oracle/product/12.2.0.1 - ORACLE_HOME
/u01/app/oracle/admin - Admin files
/u01/app/oracle/diag/rdbms/orcl/orcl - Diagnostic files
/u01/app/oracle/oradata/orcl - Database files

These details will guide you in planning your disk layout strategy when installing the Oracle database software and creating your first database.