Creating the database in a GDPC environment

In a geographically dispersed Db2® pureScale® cluster (GDPC) environment, create a database table with the datafs file system, with database logs stored in the logfs file system.

Before you begin

Ensure that you have configured the cluster for high availability. See Configuring the cluster for high availability in a GDPC environment.

Procedure

  1. Create the database.
  2. As root, change the permissions on the file systems to allow the instance user to write to them:
    root@hostA1:/> mkdir /logfs/db2inst1
    root@hostA1:/> chown db2inst1 /logfs/db2inst1
    root@hostA1:/> mkdir /datafs/db2inst1
    root@hostA1:/> chown db2inst1 /datafs/db2inst1
    
    db2inst1@hostA1:/home/db2inst1> db2start
    02/25/2011 04:00:44 0 0 SQL1063N DB2START processing was successful.
    02/25/2011 04:00:46 3 0 SQL1063N DB2START processing was successful.
    02/25/2011 04:00:47 2 0 SQL1063N DB2START processing was successful.
    02/25/2011 04:00:47 1 0 SQL1063N DB2START processing was successful.
    SQL1063N DB2START processing was successful.
    
    db2inst1@hostA1:/home/db2inst1> db2 create database MYDB on /datafs/db2inst1 dbpath
    on /logfs/db2inst1
    
    DB20000I The CREATE DATABASE command completed successfully.

What to do next

You have completed setting up your GDPC environment.