Hitachi

Hitachi Advanced Database Setup and Operation Guide


2.4.4 DB area file configuration

All data, including tables and indexes, that is stored in a DB area is physically stored in files. Files that comprise a DB area are called DB area files.

Organization of this subsection

(1) Files that can be used as DB area files

In HADB, the files types listed in the following subsections can be used as DB area files.

(a) Regular files (files in a file system)

Regular files that are normally supported by the OS can be used as DB area files.

When a regular file is updated or referenced, the file system's control area is updated or referenced. Therefore, especially when you are adding to a file, the access performance will be lower than when a block special file is used.

(b) Block special files

Block special files can be used as DB area files. A block special file functions as a single block device. It allows an entire disk or a partitioned area of a disk to be treated and accessed as a single file.

In block special files, data is manipulated in blocks. Consequently, block special files can be accessed faster than regular files.

Before the user creates a database, a block special file must be allocated taking the expected size of the database area into consideration.

Note that you must grant read-write privileges to the block special file so that it can be read and written by the HADB server. When changing the settings of a block special file, you must use the udev rules. For details about the udev rules, see the documentation for your operating system.

Important

If a block special file is opened in the write mode, an event is issued to udev when that file is closed, returning it to the state specified in the udev rules. Consequently, if the settings of the block special file are changed using the chmod or chown command, when database initialization is complete or the HADB server terminates, the owner and privileges are returned to the states specified in the udev rules.

(2) Types of DB area files

The following sections describe the five types of DB area files that are available, corresponding to the DB area types.

(a) Data DB area files

A data DB area is comprised of data DB area files.

Each data DB area consists of one or more data DB area files. A Data DB area can consist of a maximum of 1,024 data DB area files. The following figure shows the relationship between a data DB area and data DB area files.

Figure 2‒18: Relationship between a data DB area and data DB area files

[Figure]

Data DB area files are normally created using a regular file under the DB directory, but can also be created using a block special file that is not under the DB directory.

The location for storing data DB area files is specified during database initialization. It is also specified during data DB area addition following database initialization.

(b) Work table DB area files

A work table DB area is comprised of a work table DB area file.

Normally, a single work table DB area file is created using a regular file under the DB directory, but it can also be created using a block special file that is not under the DB directory.

The location for storing work table DB area files is specified during database initialization.

We recommend that you use a block special file to create the work table DB area file. If you use a regular file and an SQL statement is executed that creates multiple work tables, I/O operations might become concentrated on the file system that stores the regular file, lengthening the processing time of the SQL statement.

(c) Master directory DB area file

A master directory DB area is comprised of a master directory DB area file.

Normally, a single master directory DB area file is created using a regular file under the DB directory, but it can also be created using a block special file that is not under the DB directory.

The location for storing the master directory DB area file is specified during database initialization.

(d) Dictionary DB area file

A dictionary DB area is comprised of a dictionary DB area file.

Normally, a single dictionary DB area file is created using a regular file under the DB directory, but it can also be created using a block special file that is not under the DB directory.

The location for storing the dictionary DB area file is specified during database initialization.

(e) System-table DB area file

A system-table DB area is comprised of a system-table DB area file.

Normally, a single system-table DB area file is created using a regular file under the DB directory, but it can also be created using a block special file that is not under the DB directory.

The location for storing the system-table DB area file is specified during database initialization.

We recommend that you use a block special file to create the system-table DB area file. If you use a block special file, the HADB server outputs a warning message when the free space in the system-table DB area becomes insufficient and the system table needs to be reorganized.

Note that if you use a regular file to create the system-table DB area file, the HADB server does not output a warning message even when the free space in the system-table DB area becomes insufficient. If you choose to create a system-table DB area file by using a regular file, consider the time at which the system table is to be reorganized before you start operation. Then, reorganize the system table periodically based on the result of consideration. For details about reorganizing the system table, see 11.17 Reorganizing system tables.

(3) DB directory

The directory under which various DB area files, such as data DB area files, are stored is called the DB directory. The DB directory is created during database initialization.

The DB directory also stores the following files:

For details about the structure of the DB directory, see A.3 DB directory configuration.

(4) DB area file configuration example

When a DB area file is created using a block special file that is not under the DB directory, a symbolic link file pointing to the actual file is created under the DB directory.

The following figure shows an example of a DB area file configuration.

Figure 2‒19: Example of a DB area file configuration

[Figure]

(5) Notes about file systems

(6) Relationship between DB area files and the multi-node function

When you use the multi-node function, you need to allocate block special files to the following DB area files:

You must also make sure that the disk corresponding to the block special files to be allocated can be referenced from all nodes in the multi-node configuration.