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 |
cubrid addvoldb options database_name
options :
[--db-volume-size=size] [{-n |--volume_name=}name] [{-F |--file-path=}path] [--comment=comment] [-p|--purpose] [-S|--SA-mode|-C|--CS-mode]
The following table shows options that can be used with cubrid addvoldb utility.
|
Option |
Description |
|---|---|
|
--db-volume-size |
Specifies the database volume size in bytes. |
|
-n |
Specifies the name of the database volume to be added. |
|
-F |
Specifies the directory path where the database volume to be added will be created. |
|
--comment |
Inserts a comment about the database volume to be added. |
|
-p |
Specifies the purpose of the database volume to be added. |
|
-S |
Adds the database volume in standalone mode. |
|
-C |
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 KB(kilobytes), MB(megabytes), GB(gigabytes) and TB(terabytes), respectively. If you omit the unit, bytes will be applied.
The following example shows adding a volume for which 256MB 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 adding a volume for which 1000 pages are assigned to the testdb database in standalone mode. The volume name testdb_v1 will be created.
cubrid addvoldb -S -n testdb_v1 testdb 1000
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 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.
cubrid addvoldb -S -F /dbtemp/addvol/ testdb 1000
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 adding a volume for which 1000 pages are assigned to the testdb database in standalone mode and inserts a comment about the volume.
cubrid addvoldb -S --comment "data volume added_cheolsoo kim" testdb 1000
Purpose of the volume (-p)
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 adding a volume for which 1000 pages are assigned to the testdb database in standalone mode.
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