Home | Previous Page | Next Page   Utility Reference > onutil: Check, Define, and Modify Storage Objects > ALTER DBSLICE ADD DBSPACE >

Adding Dbspaces on a New Coserver to a Dbslice

The following example shows the onutil CREATE COGROUP command to create a cogroup for three coservers and the onutil CREATE DBSLICE command to create a dbslice that contains six dbspaces numbered dbsl.1 through dbsl.6:

% onutil
1> CREATE COGROUP c123 FROM eds.%r(1..3)
Cogroup successfully created.
2> CREATE DBSLICE dbsl FROM COGROUP c123
3> CHUNK "/dev/dbspaces/dbsl_123.%r(1..2)" SIZE 1024;

The database server creates the following dbspaces on the three coservers. The %r(first..last) formatting characters tell the database server to create two dbspace chunks on coservers eds.1 through eds.3.

Coserver Dbspace Name Pathname of Primary Chunk
eds.1 dbsl.1 /dev/dbspaces/dbsl_123.1
eds.1 dbsl.2 /dev/dbspaces/dbsl_123.2
eds.2 dbsl.3 /dev/dbspaces/dbsl_123.1
eds.2 dbsl.4 /dev/dbspaces/dbsl_123.2
eds.3 dbsl.5 /dev/dbspaces/dbsl_123.1
eds.3 dbsl.6 /dev/dbspaces/dbsl_123.2

Then you add a new coserver, eds.4, to the system and want to expand the dbslice to that coserver. The following example shows the onutil ALTER DBSLICE ADD DBSPACE command to add dbspaces dbsl.7 and dbsl.8 to coserver eds.4. The new dbspaces can be either the same size as the old dbspaces in the dbslice or a different size.

% onutil
1> ALTER DBSLICE dbsl ADD DBSPACE FROM
2> COGROUP eds.4
3> CHUNK "/dev/dbspaces/dbsl_4.%r(1..2)" SIZE 1024;

The range identifier %r(1..2) tells the database server to create two dbspaces on coserver eds.4 and automatically numbers them.

eds.1 eds.2 eds.3 eds.4
dbsl.1 dbsl.3 dbsl.5 dbsl.7
dbsl.2 dbsl.4 dbsl.6 dbsl.8

Tip:
To expand a dbslice to two or more coservers, you can specify either a coserver_range_identifier or a cogroup composed of the new coservers in the onutil ALTER DBSLICE ADD DBSPACE command.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]