Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Adding Database Volume

Descripton

For how to add new volumes to a database by using the CUBRID Manager, see Database Space.

Syntax

cubrid addvoldb  options   [argsdatabase_name    number_of_pages

options :   [{-n | --volume_name= } name]   [{-F | --file-path=} path] [ {-p | --page=}number]

[-S | -C | --SA-mode | --CS-mode] [--comment]

  • 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.
  • number_of_pages : The number of pages which is to be added to the specified database volume. It is recommended to configure a sufficiently large number of pages to be added depending on the purpose and store each volume in a separate disk according to its usages in terms of performance.
Option

The following table shows options that can be used with cubrid addvoldb utility.

Option

Description

-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 database parameter

-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.

--comment

Inserts a comment about the database volume to be added.

Name of the extended volume (-n)

The following example shows adding a volume for which 1000 pages are assigned to the testdb database in standalone mode. The volume name testdb_v1 will be created. -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.

cubrid addvoldb -S -n testdb_v1 testdb 1000

Path of the extended volume (-F)

The following example shows adding a volume for which 1000 pages 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. 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 database parameter volume_extension_path is used by default.

cubrid addvoldb -S -F /dbtemp/addvol/ testdb 1000

Purpose of the volume (-p)

The following example shows adding a volume for which 1000 pages are assigned to the testdb database in standalone mode. 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."

cubrid addvoldb -S -p index testdb 1000

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 testdb 1000

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. If the -S or -C option is not specified and the environment variable CUBRID_MODE is not defined, the system assumes to be in client/server mode.

cubrid addvoldb -C -testdb 1000

Comment about the added volume (--comment)

The following example shows adding a volume for which 1000 pages are assigned to the testdb database in standalone mode and inserts a comment about the volume. The --comment option is used to facilitate to retrieve information about 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.

cubrid addvoldb -S --comment "data volume added_cheolsoo kim" testdb 1000