Sunday, January 3, 2010

Adding chunk to dbspace in IBM Informix (IDS) using 'onspaces' utility

Recently I got into problem when there was on space left on dbspace on one of our Informix database. It took me nearly 2 hours of Googling to figure out how to add CHUNK to existing dbspace.

I thinks it would be better to blog it, this might help some other folks or might I need to use it some day when the newly added CHUNK also get full :)

For my setup I do not have the additional hard drive and have a plenty of free space on Unix partition. Therefore I used the unix file as new Chunk.

'onmonitor', oncheck -pe, onstat -d commands can be used to view the status of dbspaces.

Here are the steps to add chunk.

1. First create a chunk file in Unix filesystem and set the permission so that informix user/group have the read/write permission on the file.

touch /export/home/dbspace/billdb_dg/lv_recorddbs11

chmod 660 /export/home/dbspace/billdb_dg/lv_recorddbs11

Note: I run the above commands with 'informix' user or the owner of informix db.

The following example adds a 2GB chunk to recordbs. An offset of 200 kilobytes is specified.

onspaces -a recorddbs -p /export/home/dbspace/billdb_dg/lv_recorddbs11 -o 200 -s 2093150

Here -s 2093150 is specified in KB

The newly added chunk is available immediately.

After you create the chunk, you must perform a level-0 backup of the root dbspace and the dbspace that contains the chunk.


  1. I am a newbie to informix and your blog helped me a lot.thank you very much.

  2. This is the best description of adding a chunk to an existing dbspace that I've found. Thank you for posting this!

  3. yes, very helpful indeed.

  4. Gracias. Me fĂșe de gran ayuda.

  5. Hi,
    Thank you very much for information about Adding chunk to dbspace in IBM Informix, And i hope this will be useful for many people. Keep on updating these kinds of knowledgeable things.