spaces

Use the infx storage command to manually manage storage spaces and chunk files.

simple space management

For this section of the guide, we will use the default infx instance, and create chunks as cooked files directly in the chunks directory.

create storage spaces

Use the new function of the storage command to create storage spaces.

Example, create a 100mb data storage space called dat01, on a new chunk file. The space will have the default page size.

infx storage func=new dbtype=data space=dat01 size=100 chunk=new

infx automatically created the new chunk file /infx/inst/infx01/chks/dat01.000, set permissions, and created the new storage space.

If the instance is a primary server, infx also creates new chunk files on the secondary servers.

Lines 8 and 14 show the new storage space dat01 and its chunk.

extending storage spaces

Use the extend function of the storage command to increase the size of an existing storage space.

Example, add 50mb to the dat01 storage space, on a new chunk file

infx storage func=extend chunk=new size=50

infx automatically created the new chunk file /infx/inst/infx01/chks/dat01.001, set permissions and extended the storage space.

Line 15 shows the new chunk that was created to extend storage space dat01.

You could extend the storage space by adding to the existing chunk.

Example, add 50mb to the dat01 storage space, re-using the existing chunk file.

infx storage func=extend chunk=same size=50

infx extended the storage space, using the last chunk that was allocated to it i.e. data01.001. It automatically calculated the required offset and added the chunk to the storage space.

Line 16 shows the extra chunk created by extending the existing dat01.001 chunk file.

Check your platform and file system documentation to determine the maximum allowable chunk size.

drop storage space

Use the drop function of the storage command to remove a storage space that is no longer in use. You cannot drop a storage space if it is still in use.

Remove the dat01 storage space, if it is no longer in use.

infx inst func=drop space=dat01

Remove only one chunk of the storage space, if the chunk is no longer in use. Remove the chunk on dat01.001 with an offset of 50mb.

infx inst func=drop space=dat01 chunk=dat01.001 offset=50

mirroring

To create a mirrored storage space, or to extend a mirrored storage space, you must pass a mirror chunk name to the storage command. infx automatically names mirror chunks the same way that it names primary chunks, with an “m” added at the beginning.

space dat01 => mirror chunk /infx/inst/infx01/chks/mdat01.000

The mchunk parameter behaves exactly like the chunk parameter. It supports the new and same keywords, as well as executing the INFXCHUNK script to create new chunks. This script will receive the mirror chunk name as its parameter.

Create a mirrored storage space.

infx storage func=new space=new01 chunk=new mchunk=new size=100

This command will create new chunks, new01.000 and mnew01.000.

The infx storage command also supports turning mirroring on and off, as well as changing chunk status. See the space mirroring reference for more details.