Hello Mark,
you don't need a storage pool to extend chunks. You only need to set that chunk extendable:
$ echo 'EXECUTE FUNCTION task("modify chunk extendable on", 4);' | dbaccess sysadmin - # set chunk#4 extendable
$ echo 'EXECUTE FUNCTION task("modify chunk extend", 4, "8GB");' | dbaccess sysadmin - # extents chunk#4 8GB
That are the steps to manually extend chunks. If you want that informix expands dbspaces by itself you need some more
steps:
$ onmode -wf SP_AUTOEXPAND=1
$ onmode -wf SP_THRESHOLD=262144
$ onmode -wf SP_WAITTIME=300
Now ALL dbspaces and it chunks with extandable flag set to on are expanded when there getting full.
In online.log you can see that it work:
05/11/20 18:21:25 Chunk 7 in space 'datdbs01' has been extended by 131072 kb.
05/11/20 18:38:20 Chunk 7 in space 'datdbs01' has been extended by 8000000 kb.
05/11/20 19:21:23 Chunk 7 in space 'datdbs01' has been extended by 131920 kb.
05/11/20 19:25:41 Chunk 7 in space 'datdbs01' has been extended by 8000000 kb.
This does not work with smart blobs and blob dbspaces and during backup:
05/13/20 09:26:45 Extend chunk 8 failed. System archive in progress. Try again later.
05/13/20 09:26:45 Extend chunk 4 failed. System archive in progress. Try again later.
05/13/20 09:26:45 Extend chunk 6 failed. System archive in progress. Try again later.
05/13/20 09:26:45 Extend chunk 9 failed. System archive in progress. Try again later.
Since you don't want to expand some dbspaces like rootdbs, tmpdbs, llogdbs and plogdbs you need to that
these dbspaces to not expandable:
$ echo 'EXECUTE FUNCTION task("modify space sp_sizes", "rootdbs", 0);
$ echo 'EXECUTE FUNCTION task("modify space sp_sizes", "plogdbs", 0);
$ echo 'EXECUTE FUNCTION task("modify space sp_sizes", "llogdbs", 0);
$ echo 'EXECUTE FUNCTION task("modify space sp_sizes", "tmpdbs", 0);
The job which is doing that is the sysadmin "mon_low_storage" job.
You can modify the interval between every start like that (for example every 10 minutes):
$ dbaccess -e sysadmin - <<EOF
UPDATE ph_task SET tk_start_time = "00:00:00",
tk_stop_time = "00:00:10",
tk_frequency = INTERVAL (10) MINUTE TO MINUTE,
tk_next_execution = ROUND(CURRENT, 'HH')::DATETIME YEAR TO SECOND
WHERE tk_name = "mon_low_storage";
UPDATE ph_task SET tk_next_execution = ROUND(CURRENT, 'HH')::DATETIME YEAR TO SECOND
WHERE tk_name = "mon_low_storage";
UPDATE ph_task SET tk_next_execution = ROUND(CURRENT, 'HH')::DATETIME YEAR TO SECOND
WHERE tk_name = "mon_low_storage";
EOF
This also works with raw devices each on top of a logical volume. On Linux you need some udev rules to create the raw
device /dev/raw/rawX and the sysmlink to the logical volume.
Cheers,
Markus
------------------------------
Markus Holzbauer
------------------------------