Manually expanding a space or extending an extendable chunk

You can manually expand a space or extend a chunk when necessary, instead of waiting for OneDB to automatically expand the space or extend a chunk.

Before you begin

Prerequisites:
  • You can extend a chunk only if it is in an unmirrored dbspace or temporary dbspace.
  • The chunk must be marked as extendable before it can be extended. If not, you must run the admin() or task() function with the modify chunk extendable argument to specify that the chunk is extendable.
  • If a space cannot be expanded by extending a chunk, the storage pool must contain active entries that the server can use to create new chunks.

Procedure

To immediately increase your storage space:
Either:
  • Manually expand a space by running the admin() or task() function with the modify space expand argument, as follows:
    EXECUTE FUNCTION task("modify space expand", "space_name", "size");

    For example, the following command expands space number 8 by 1 gigabyte:

    EXECUTE FUNCTION task("modify space expand", "8", "1000000");

    The server expands the space either by extending a chunk in the space or adding a new chunk. The server might round the requested size up, depending on the page size of the storage space and the configured chunk size for any storage pool entry used during the expansion.

  • Manually extend a chunk by running the admin() or task() function with the modify chunk extend argument, as follows:
    EXECUTE FUNCTION task("modify chunk extend", "chunk_number", "extend_amount");
    For example, the following command extends chunk number 12 by 5000 KB:
    EXECUTE FUNCTION task("modify chunk extend", "12", "5000");

    The server might round the requested size up, depending on the page size of the storage space.