Update:
For anyone interested, I ended up containerizing the servers (using LXD).
So far, it seems to work well, and restoring the database to a model state appears to add little (if any noticeable) latency to the previous process.
The only curious thing I noticed was that the logging state hadn't been duplicated when I copied INFORMIXDIR. The containers are persistent, so updating the model state via ontape resolved that (we snapshot, then restore to model for common case work flow).
However, this implies that logging state determination is calculated using data outside of INFORMIXDIR (including the chunk files) (?)
Original Message:
Sent: Thu June 18, 2020 10:45 PM
From: Daniil T
Subject: Creating new server from existing one
Okay, so I'm getting the following error when attempting to start the 2nd server:
13:43:05 B-tree scanner index compression level set to med.
13:43:05 Physical Recovery Started at Page (2:76121).
13:43:05 Physical Recovery Complete: 1041 Pages Examined, 775 Pages Restored.
13:43:05 Logical Recovery Started.
13:43:05 100 recovery worker threads will be started.
13:43:05 Transaction Not Found.
13:43:05 Log Record: log = 458, pos = 0x28017e4, type = OLDRSAM:HUPBEF(42), trans = 56
13:43:06 Cannot Rollforward from Checkpoint.
13:43:07 oninit: Fatal error in shared memory initialization
13:43:07 IBM Informix Dynamic Server Stopped.
13:43:07 mt_shm_remove: WARNING: may not have removed all/correct segments
From my limited research the shared memory errors are apparently a red herring.
It would seem the real problem is the "Transaction Not Found" and "Cannot Rollforward from Checkpoint" notifications.
Now, I've copied the entire INFORMIXDIR, and chunk files to a directory dedicated to the 2nd server.
The only changes I've made are in renaming and/or editing the onconfig, sqlhosts, and env files so that they refer to the 2nd server.
Aside from the aforementioned changes, the 2nd server is an exact copy of a snapshot of the source server (snapshot taken while the server was shutdown).
I can restore to the snapshot and start the source server fine (every time) if I don't make any of the 2nd server changes.
According to this relatively old post:
* http://members.iiug.org/forums/ids/index.cgi/noframes/read/36151
I can force the server to the next log (whatever that means).
Is it possible to "reset" the logs and/or checkpoint on the source server before taking another ("better"?) snapshot?