Syntax

cubrid: An integrated utility for CUBRID service and database management.

addvoldb: A command that adds a specified number of pages of the new volume to a specified database.

options: A short option starts with a single dash (-) while a full name option starts with a double dash (--).

database_name: Specifies the name of the database to which a volume is to be added without including the path name to the directory where the database is to be created.

Options

The following table shows options available with the cubrid addvoldb utility.

Option

Description

--db-volume-size

Specifies the database volume size in bytes.
Default value : A value of db_volume_size, the system parameter

-n
--volume-name

Specifies the name of the database volume to be added.
Default value : A value in the format of dbname_number, configured by the system

-F
--file-path

Specifies the directory path where the database volume to be added will be created.
Default value : A value of volume_extension_path, the system parameter

--comment

Inserts a comment about the database volume to be added.

-p
--purpose

Specifies the purpose of the database volume to be added.
Default value : Generic volume

-S
--SA-mode

Adds the database volume in standalone mode.

-C
--CS-mode

Adds the database volume in client/server mode.

Size of the extended volume (--db-volume-size)

--db-volume-size is an option that specifies the size of the volume to be added to a specified database. If the --db-volume-size option is omitted, the value of the system parameter db_volume_size is used by default. You can set units as K, M, G and T, which stand for kilobytes (KB), megabytes (MB), gigabytes (GB), and terabytes (TB) respectively. If you omit the unit, bytes will be applied.

The following example shows how to add a volume for which 256 MB are assigned to the testdb database.

cubrid addvoldb -p data --db-volume-size=256M testdb

Name of the extended volume (-n)

-n is an option that specifies the name of the volume to be added to a specified database. The volume name must follow the file name protocol of the operating system and be a simple one without including the directory path or spaces. If the -n option is omitted, the name of the volume to be added is configured by the system automatically as "database name_volume identifier." For example, if the database name is testdb, the volume name testdb_x001 is automatically configured.

The following example shows how to add a volume for which 256 MB are assigned to the testdb database in standalone mode. The volume name testdb_v1 will be created.

cubrid addvoldb -S -n testdb_v1 --db-volume-size=256M testdb

Path of the extended volume (-F)

The -F option is used to specify the directory path where the volume to be added will be stored. If the -F option is omitted, the value of the system parameter volume_extension_path is used by default.

The following example shows how to add a volume for which 256 MB are assigned to the testdb database in standalone mode. The added volume is created in the /dbtemp/addvol directory. Because the -n option is not specified for the volume name, the volume name testdb_x001 will be created.

cubrid addvoldb -S -F /dbtemp/addvol/ --db-volume-size=256M testdb

Comment about the added volume (--comment)

The --comment option is used to facilitate to retrieve information on the added volume by adding such information in the form of comments. It is recommended that the contents of a comment include the name of DBA who adds the volume, or the purpose of adding the volume. The comment must be enclosed in double quotes.

The following example shows how to add a volume for which 256 MB are assigned to the testdb database in standalone mode and inserts a comment about the volume.

The -p option is used to specify the purpose of the volume to be added. The reason for specifying the purpose of the volume is to improve the I/O performance by storing volumes separately on different disk drives according to their purpose. Parameter values that can be used for the -p option are data, index, temp and generic. The default value is generic. For the purpose of each volume, see "Database Volume Structure."

The following example shows how to add a volume for which 256 MB are assigned to the testdb database in standalone mode.

cubrid addvoldb -S -p index --db-volume-size=256M testdb

Standalone mode (-S)

The -S option is used to access the database in standalone mode without running the server process. This option has no parameter. If the -S option is not specified, the system assumes to be in client/server mode.

cubrid addvoldb -S --db-volume-size=256M testdb

Client/server mode (-C)

The -C option is used to access the database in client/server mode by running the server and the client separately. There is no parameter. Even when the -C option is not specified, the system assumes to be in client/server mode by default.

cubrid addvoldb -C --db-volume-size=256M testdb

Example

The following example shows how to create a database, classify volume usage, and add volumes such as data, index, and temp.