## Volumes (Permanent Storage)

The database system permanently stores the data and log entries of a database instance in the volumes.

You can use the following memory types for volumes:

● File (F)

A volume can be a part of a physical hard disk, a complete physical hard disk, or a storage system consisting of several storage units.

● UNIX/Linux only: link (L)

● UNIX/Linux only: raw device (R)

The unit that the database system uses to write information to and read it from the permanent storage is a page of 8 KB. A page corresponds to a certain number of operating system blocks. Pages are often the unit used to specify memory and disk space.

#### Volume Types

The database system differentiates between data and log volumes.

Volumes of a Database Instance

When you create a new database instance, you need to configure at least one data volume and one log volume.

Example (Template Desktop PC / Laptop for a MaxDB Database Instance)

Volume | Number | Size | Path and File Name
Data volume | 1 | 256 MB | <independent_data_path>\data\DISKD0001
Log volume | 1 | 50 MB | <independent_data_path>\log\DISKL0001

You cannot change the size of an existing volume. If necessary, you can add more data and log volumes while the database is running. Data volumes can also be deleted.

See

Database Manager GUI, Creating, Displaying and Deleting Volumes

Database Manager CLI, db_addvolume and db_deletevolume

For recommendations on configuring the volumes see Planning the Database Instance, and for information on technical restrictions on configuring the volumes see Technical Restrictions.

##### Data volumes

The database system stores the following in the data volumes:

● Application data

● Database catalog

● The converter saved at the last savepoint

● Undo log files

● Sequences

● Restart information

All data volumes are known collectively as the data area.

The database system uses internal striping to distribute the data belonging to a table evenly across all the data volumes.

Data Area

The size of the data area must not fall below 2,000 pages. There must also always be sufficient space in the data area to hold all the data that is created during database operations. You can configure your database instance in such a way that the database system automatically adds a new data volume as soon as the available storage space in the data area is too small.

See

Database Manager GUI, Switching on/off Automatic Extension of the Data Area

Database Manager CLI, auto_extend

For large database instances you get a better performance if you configure multiple data volumes on different hard disks. You can use the general database parameter MAXDATAVOLUMES to configure the maximum amount of data volumes that you can define for a database instance.

##### Log Volumes

The database system stores the redo log entries (after images) into the log area.

All log volumes are known collectively as the log area. You can use the general database parameter MAXLOGVOLUMES to configure the maximum amount of log volumes that you can define for a database instance.

The log area is subdivided into logical log segments. You configure the size of the log segment with the general database parameter LOG_SEGMENT_SIZE. It is unrelated to the size of the individual log volumes, but may not exceed the total of all log volumes. Select the size in such a way as to ensure that enough space remains in the log area when a log segment is being backed up to receive any new redo log entries that are written during the backup.

Log Area

The database system overwrites the log area cyclically. However, redo log entries in the log area can only be overwritten once they have been backed up. If you do not perform any log backups, the database system will at one stage have filled up the complete log area with redo log entries. A full log area causes the database to hang. You should therefore perform regular log backups or activate the automatic log backup.

See

Backing Up Log Entries

Database Manager GUI, Activating and Deactivating Automatic Log Backup

Database Manager CLI, autolog_on

When the log area is full, you have to execute a log backup. Adding a new log volume does not help; the current writing position is not usually at the end of the log area, which is where the database system attaches the new log volume.

Log Area is Full

You can set the overwrite mode for the log area, so that the database system overwrites the log area without first performing log backups. Note, however, that this will interrupt the backup history, and you will no longer be able to restore the database instance to its most recent state.

For the security of your data, we recommend that you mirror the log area. If hardware-based mirroring is not possible, the database system can mirror the log area.

See Log settings

See also:

Data Storage

Database Parameters

Creating and Configuring a Database Instance

Backing Up and Restoring