Configuring database storage for Db2

Db2 supports traditional and software-defined storage types. You define your storage types during database provisioning.

Note: Starting from IBM® Software Hub 5.2.0 release, Db2 introduces a new custom resource called Db2uInstance, which has slightly different specification.

The following diagram illustrates the storage configuration options for Db2.

Figure 1. Database storage for Db2 OLTP (using Db2uInstance Custom Resource)

The preceding diagrams illustrate the storage configuration options for Db2uInstance.

Mandatory storage
  • System data - shared (RWX) volume for Db2 metadata, also referenced as Meta.
  • User data - non-shared (RWO) volume for database storage, also referenced as Data.
  • Archivelogs - shared (RWX) volume for archive logs
Optional storage
  • Backup - shared (RWX) volume for database backups
  • Activelogs - non-shared (RWO) volume for transactional logs
  • Tempts - non-shared (RWO) volume for temporary tablespaces
  • Auditlogs - shared (RWX) volume for audit logs
Figure 2. Database storage for Db2 OLTP (using Db2uCluster Custom Resource)

The preceding diagrams illustrate the storage configuration options for Db2uCluster.

Mandatory storage
  • System data - shared (RWX) volume for Db2 metadata, also referenced as Meta.
  • User data - non-shared (RWO) volume for database storage, also referenced as Data.
Optional storage
  • Backup - shared (RWX) volume for database backups
  • Activelogs - non-shared (RWO) volume for transactional logs
  • Tempts - non-shared (RWO) volume for temporary tablespaces
  • Archivelogs - non-shared (RWO) volume for archive logs
  • Auditlogs - shared (RWX) volume for audit logs

For more information on supported storage types, see Storage requirements.

Notes:
  • When provisioning the database, for user data (the main database data), select ReadWriteOnce (RWO) access mode for your storage.
  • Select 4 K sector size during provisioning if your storage supports 4 K (this setting is mandatory for Portworx). Db2 also supports 4 K for OpenShift® Data Foundation.
  • For more information about configuring dynamic provisioning for NFS storage for testing, see the External Storage topic in the kubernetes-incubator repository on GitHub.