Hitachi

Hitachi Advanced Database Setup and Operation Guide


16.3.8 Creating a database

This subsection explains the procedure for creating a database when the multi-node function is used.

Organization of this subsection

(1) General procedure for creating a database

The following shows the general procedure for creating a database:

  1. Initialize the file systems to be inherited at node switchover.

  2. Create a database on the master node.

  3. Create a DB directory on each slave node.

(2) Initializing the file systems subject to node switchover

Use commands provided by the operating system to initialize the file system for the system directory and the file system that stores the synonym dictionary files.

Initializing the file system for the system directory

The following example initializes /dev/vg_hadb/hadb_sys, which has been created as an LV for the system directory, as an ext4 file system.

Command execution example

mkfs -t ext4 /dev/vg_hadb/hadb_sys
Initializing the file system that stores synonym dictionary files

The following execution example initializes /dev/vg_hadb02/hadb_syndict, which was created as the LV for storing synonym dictionary files, as an ext4 file system.

Command execution example

mkfs -t ext4 /dev/vg_hadb02/hadb_syndict

If you will not conduct synonym searches, you do not need to initialize the file system that stores synonym dictionary files.

(3) Creating a database on the master node

The following explains how to create a database on the master node.

First, execute the OS mount command on the master node, and on $DBDIR/ADBSYS mount the file system used for the system directory.

Next, execute the adbinit command on the master node, and create the database. The following shows an example of specifying the initialization option of the adbinit command.

■ Initialization option specification example (master node)

Finally, after execution of the adbinit command ends, from $DBDIR/ADBSYS unmount the file system used for the system directory.

(4) Creating a DB directory on each slave node

Execute the adbinit command on each of the slave nodes. The initialization option to be specified here is different from that specified for the master node in the following ways:

■ Initialization option specification example (slave node hadb02)

■ Initialization option specification example (slave node hadb03)