Informix

 View Only
Expand all | Collapse all

ontape error

  • 1.  ontape error

    Posted Tue July 21, 2020 05:33 PM
    Hi,

    I am doing one RSS installation over version 14.10.FC3 and getting some strange errors.
    Using and old command that I used before:

    ontape -s -L 0 -t STDIO -F | (ssh informix@10.0.11.113 '. ~/.bashrc ; ontape –p -e –t STDIO ; onmode –d RSS cmsantar01_net')

    I am receiving syntax errors about ontape and onmode.
    There any new options to define? like DBREMOTECMD for bash?

    Thanks for any help,

    SP


    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------

    #Informix


  • 2.  RE: ontape error

    IBM Champion
    Posted Tue July 21, 2020 05:57 PM
    Sergio:

    Try using ifxclone instead, it handles all of the complexity of an archive-and-remote-restore for you, even setting the server type of the target when it is done. You run ifxclone on the target machine. It can optionally copy and modify the ONCONFIG and sqlhosts files for you or use ones that you have built by hand:

    $ ifxclone
    ERROR - missing required parameter (source (S))  
    ifxclone -SIPtip                          # Clone a server
    -h      --help                            # Display this output
    -S      --source=<name>                   # Name of the source node
    -I      --sourceIP=<IP>                   # IP address of source node
    -P      --sourcePort=<port>               # Port number of source server
    -t      --target=<name>                   # Name of target server
    -i      --targetIP=<IP>                   # IP address of target server
    -p      --targetPort=<port>               # Port number of target server
    -d      --disposition=[RSS|ER|HDR|SDS]        # Clone disposition
    (default:standard)
    -s      --size=[tiny|small|medium|large]  # Configuration size       
    -c      --configParm="PARAMETER=VALUE"    # Configuration override
    -L      --useLocal                        # Use the local config and sqlhost
    -T      --trusted                         # No userid/password required
    -a      --autoconf                # Propagate SQLHOSTS and trusted-host records  
    to Enterprise Replication nodes and high-availability replication servers.
    -k      --createchunkfile         # automatically create chunks on the target



    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 3.  RE: ontape error

    IBM Champion
    Posted Tue July 21, 2020 05:59 PM
    Oh, forgot, you also have to set ENABLE_SNAPSHOT_COPY to 1 in the source server's ONCONFIG file to enable ifxclone to work against that server.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 4.  RE: ontape error

    IBM Champion
    Posted Tue July 21, 2020 06:16 PM

    And it doesn't work over an SSL link – forget the bug ID – might be fixed in 14.10.FC4

     

    Cheers

    Paul

     






  • 5.  RE: ontape error

    IBM Champion
    Posted Tue July 21, 2020 06:28 PM

    My bad, the bug is logical corruption after restart with encryption and SSL active with server create with ifxclone

     






  • 6.  RE: ontape error

    IBM Champion
    Posted Tue July 21, 2020 06:29 PM

    idsdb00105650 ( IT32529 ) : With extended Checkpoint/Log reserved pages  and encryption  at rest with rootdbs encrypted, server may fail to come online

     

     






  • 7.  RE: ontape error

    Posted Wed July 22, 2020 05:35 AM
    Thanks for reply Art,

    I have seen information about ifxclone on last presentation in Lisbon, but all the experiences I have done don't have success.
    Maybe needed some more information about the pre-requirements ...

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 8.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 04:09 AM
    Hi Sergio,

    DBREMOTECMD is for TAPEDEV/LTAPEDEV remote syntax - not your case.

    What error are you getting?

    I think 'ontape --' syntax diagram is slightly misleading in suggesting -e and -encrypt might be synonym - they are not (-e is "external").
    Is it working with -encrypt instead of -e ?

    HTH,
     Andreas

    ------------------------------
    Andreas Legner
    ------------------------------



  • 9.  RE: ontape error

    Posted Wed July 22, 2020 05:47 AM
    Thanks for reply Andreas,

    I have used option -e as it says on help external ...
    I am trying to use SSL connection to do the operation as I have used before with no encryption activated on informix.
    The errors I am getting are about syntax ??!!
    ontape -s -L 0 -t STDIO -F | (ssh informix@10.0.11.113 '. ~/.bashrc ; ontape –p -e –t STDIO ; onmode –d RSS cmsantar01_net')
    informix@10.0.11.113's password:
    invalid argument
    ontape
    usage:
    { -a [-d] |
    -c |
    -l [-C | -X] [-d] |...

    usage: onmode [-abBCCcDdFIjklMmnOPpQRrSsuWxYyZz] |
    ...
    onmode: Unknown option –d

    Regards,

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 10.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 10:05 AM
    Hi Sergio,

    so you're not even intending to have the RSS encrypted?
    Then omit the -e altogether   --   -t <tape_dev>  and  -e (external restore) should be mutual exclusive, and what you're trying is not an external restore.

    As for that onmode syntax error, I'm clueless right now.

    HTH,
     Andreas

    ------------------------------
    Andreas Legner
    ------------------------------



  • 11.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 10:09 AM

    Not just a cut-and-paste issue for the "-d", not all "-" are not created equal

     






  • 12.  RE: ontape error

    Posted Wed July 22, 2020 10:19 AM
    Thanks Paul,

    lazy guys like me do copy past, problem is solved rewriting all :)

    Regards,

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 13.  RE: ontape error

    Posted Wed July 22, 2020 10:15 AM
    Hi Andreas,

    I am just trying to create one RSS server without encryption, as this is a new project and we are doing some tests.
    I already have tryed without -e with same result...

     ontape -s -L 0 -t STDIO -F | ssh informix@10.0.11.113 "source ~informix/.bashrc ; ontape –p –t STDIO"
    informix@10.0.11.113's password:
    invalid argument
    ontape
    usage:
    { -a [-d] |
    ...
    Program over.

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 14.  RE: ontape error

    Posted Wed July 22, 2020 08:23 AM
    Edited by System Fri January 20, 2023 04:28 PM
    Hi Sergio

    Your command syntax seems correct, so to me it implies it could be a Shell related issue. Split the work up into steps to see if it yields more information...

    [Pri]$  ontape -s -L 0 -F -t STDIO | ssh informix@<RSS IP or DNS name> "source ~informix/.bashrc; ontape -p -t STDIO"

    When your Primary returns to it's command prompt...

    [RSS]$  onmode -d RSS <Pri INFORMIXSERVER>

    ...or my preference is as @Art Kagel suggests, as it may be faster...

    Set these $ONCONFIG parameters...

    [Pri]$  onstat -g cfg | egrep "DISCOVER|SNAPSHOT|LOG_INDEX"
    LOG_INDEX_BUILDS 1
    ENABLE_SNAPSHOT_COPY 1
    CDR_AUTO_DISCOVER 1

    ...then...

    [RSS]$  ifxclone -T -S <Pri INFORMIXSERVER> -I <Pri IP or DNS name> -P <Pri Port> -t <RSS INFORMIXSERVER> -i <RSS IP or DNS name> -p <RSS Port> -d RSS

    ...then monitor the read/write activity with "onstat -D r 1" and also the Message Log. ​

    You will have to format your sqlhosts file and tidy up your $ONCONFIG afterwards because ifxclone doesn't like doing the housekeeping.

    Regardless of which method you choose, you may want to give consideration to RSS_FLOW_CONTROL on your Primary node.

    ------------------------------
    Kirit Rana
    ------------------------------



  • 15.  RE: ontape error

    Posted Wed July 22, 2020 10:05 AM
    Thanks for help Kirit,

    I have already tried to use Art suggestion but I am getting some errors, it seems they could be related with hardware differences ?? as the new server has smaller configuration ... [half processor and half memory]
      
    14:55:09 IBM Informix Dynamic Server Version 14.10.FC3X4
    14:55:09 VP 8 is requesting 8192 kaio event resources.
    14:55:09 VP 10 is requesting 8192 kaio event resources.
    14:55:10 DISK INITIALIZATION ABORTED: potential instance overwrite detected.
    To disable this check, set FULL_DISK_INIT to 1 in your config file and retry.

    14:55:10 oninit: Fatal error in shared memory initialization

    The command executed thru pipe returns ontape help... 

    ontape -s -L 0 -t STDIO -F | ssh informix@10.0.11.113 "source ~informix/.bashrc ; ontape –p –t STDIO"
    informix@10.0.11.113's password:
    invalid argument
    ontape
    usage:
    { -a [-d] |
    -c |
    -l [-C | -X] [-d] |
    -p [-e|-encrypt|-decrypt] [-pw [<filename>]] [-rename {-f <filename> |
    -p <old path> -o <old offset> -n <new path> -o <new offset>...}]
    [-t tape_device_path [-v]] [-d] |
    -S [-d] [-pw [<filename>]] |
    -r [-encrypt|-decrypt] [-pw [<filename>]] [-rename {-f <filename> |
    -p <old path> -o <old offset> -n <new path> -o <new offset>...}]
    [-D DBspace_list] [-t tape_device_path [-v]] [-d] |
    -s [[-L archive_level][-F]] [-A database_list] [-B database_list]
    [-N database_list] [-U database_list] [-t tape_device_path [-v]] [-d] }
    ...
    Program over.

    SP


    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 16.  RE: ontape error

    Posted Wed July 22, 2020 10:33 AM
    Hi Sergio

    The error that manifests from the ifxclone attempt is because informix has detected the existence of a previous Instance. I assume your target RSS node was down at the time and if it was you could try...

    [RSS]$  cat /dev/null > path-to-chunk-files/*

    ...and try again. I'm assuming you are using cooked chunks.

    As you can see from the ontape help; your syntax is fine. I'm guessing that your informix user .bashrc correctly sets up your RSS node environment and that the target Instance is down at the time you initiate the ontape on the Primary node.

    ------------------------------
    Kirit Rana
    ------------------------------



  • 17.  RE: ontape error

    Posted Wed July 22, 2020 12:20 PM
    Edited by System Fri January 20, 2023 04:10 PM
    Hi Kirit,

    I have done the initialization of root device and even after adjusting the settings on $ONCONFIG for new server,
    When I try to bring it up I get errors:

    17:14:38 Physical Recovery Started at Page (1:263).
    17:14:38 Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored.
    17:14:38 Logical Recovery Started.
    17:14:38 10 recovery worker threads will be started.
    17:14:39 rsrecvr.c 4832 set EOF
    17:14:39 Logical Recovery has reached the transaction cleanup phase.
    17:14:39 Logical Recovery Complete.
    0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks

    17:14:40 oninit: Fatal error in shared memory initialization

    17:14:40 IBM Informix Dynamic Server Stopped.

    17:14:40 mt_shm_remove: WARNING: may not have removed all/correct segments

    Forget ontape problem,I follow Paul suggestion and after typing all it works fine. I am one lazy boy!
    Sorry

    SP


    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 18.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 12:41 PM
    You can use the following command to clean up from a failed server startup or incomplete shutdown:

    onclean -ky

    Run it twice and all will be cleaned up.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 19.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 10:42 AM

    As part of the process then switch FULL_DISK_INET to zero, something like ..

     

    Sed –I "s/^FULL_DISK_INIT[[:space:]].*/FULL_DISK_INIT 0/"  ${INFORMIXDIR}/etc/onconfig.${ONCONFIG}

     

    or something like

     

    dd if=/dev/zero of=<ROOTDBS> bs=2048 count=100 –o notrunc

     

    If rootdbs is large then null'ing out the entire file can be expensive as it has to be built again from scratch

     

    Cheers

    Pau

     






  • 20.  RE: ontape error

    Posted Wed July 22, 2020 11:12 AM
    Hi Paul 

    My reasoning for null'ing the dbspace chunk files is that in the past I have gone around in circles with FULL_DISK_INIT.

    I note your point however. Perhaps removing the root chunk file on the RSS node and then fallocate'ing to create it afresh might be an option.

    ------------------------------
    Kirit Rana
    ------------------------------



  • 21.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 11:19 AM

    Had a customer with 200GB+ rootdbs, nulling and recreating took forever

     

    My standard restore scripts use the onstat –d to make sure all the files are in place and correct size before the actual ontape starts.

     

    But a mute point with raw devices

     

    Remember with encryption you will need to remove the keys as well if you don't see DISK_FULL_INIT. And if you are running multi-instance on a server then removing the wrong keys is somewhat annoying

     

    Cheers

    Paul

     






  • 22.  RE: ontape error

    Posted Wed July 22, 2020 12:23 PM

    I have done the initialization of root device and even after adjusting the settings on $ONCONFIG for new server,
    When I try to bring it up I get errors:

    17:14:40 oninit: Fatal error in shared memory initialization

    17:14:40 IBM Informix Dynamic Server Stopped.

    17:14:40 mt_shm_remove: WARNING: may not have removed all/correct segments

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 23.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 12:32 PM

    Run ipcs and see if there are any segments  - they will start with 0x52. Onclean –ky should clean them out for you

     

    Cheers

    Paul

     






  • 24.  RE: ontape error

    Posted Wed July 22, 2020 01:00 PM
    I have already done that and the results keep the same.
    What I am doing:
    1-delete server entry on source sqlhosts
    2-clean all trace elements on destiny [onclean -ky]
    3-run ifxclone and after starting copy it returns error...

    Am I doing something wrong? There are any special requirements to provide?

    Thanks for your help,

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 25.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 01:04 PM

    Can you initialize the engine on the serve, outside of ifxlcone ?

     






  • 26.  RE: ontape error

    Posted Wed July 22, 2020 02:20 PM
    yes, I have done the manual process with ssh pipe and work fine.
    As I am interested with ifxclone usage, I have tried with your sugestions but always get error...
    maybe I am doing something wrong... 

    I would like to have some more knowledge about this tool and it's usage, the project I am doing have 12 systems to create one RSS for each one.
    As the simplicity of ifxclone usage,maybe the perfect tool :)

    Thanks again for your help

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 27.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 02:18 PM
    Sergio:

    Are you trying to run ifxclone on the source system? You have to run it on the target not the source.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 28.  RE: ontape error

    Posted Wed July 22, 2020 02:29 PM
    Hi Art,

    Yes, I am running ifxclone on target RSS server.
    The difference I have is on hardware:
    Source server 4 CPU and 16 Gb RAM
    Target RSS 2 CPU and 8 Gb RAM
    dbspace configuration is the same on both servers

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 29.  RE: ontape error

    IBM Champion
    Posted Wed July 22, 2020 02:33 PM
    That should not make a difference. I don't know why you are having trouble. I'll try to make time to look through the thread for the command line you are using and see if anything jumps out.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 30.  RE: ontape error

    Posted Wed July 22, 2020 02:24 PM
    Edited by System Fri January 20, 2023 04:26 PM
    Sorry Sergio, I was away from the keyboard.

    I haven't read the entire thread so apologies if I type something that's already been discussed. Run this on the node implied in the command prompt...

    [RSS]$  onclean -ky
    [RSS]$  onclean -ky
    [RSS]$  ipcs

    If you still see any Shared Memory Segments it most likely means you could be running some other application that connects to informix and is still attached to the address in physical memory where informix wants to attach when it is initialised. In that case as the 'root' user run..

    [RSS]$  ipcrm -a

    This should blow everything away.

    Next...

    [Pri]$  onstat -g rss

    If you see your RSS noode from the first ifxclone attempt still defined, then run...

    [Pri]$ onmode -d delete RSS <RSS INFORMIXSERVER>

    Next...

    • Delete entry for RSS node from the sqlhosts file on your Primary node
    • Delete entry for Primary node from your sqlhosts file on your RSS node
    • Run your ifxclone steps again

    Good luck! I'll check this thread in the morning now (UK Time).

    ------------------------------
    Kirit Rana
    ------------------------------



  • 31.  RE: ontape error

    Posted Thu July 23, 2020 05:06 AM

    Hi,

    I have looking for information and found on version 14 some differences for ifxclone.
    We need to add trust between computers EXECUTE FUNCTION TASK("cdr add trustedhost","host1, host2,..)
    I have done the steps, but now I am facing one permission issue??

    ifxclone -S cmsantar01_net -I 10.43.0.12 -P autarquia_tcp -t sanhdrifx_net -i 10.0.11.113 -p autarquia_tcp -d RSS
    Enter User ID to connect to Source Server ->informix
    Enter Password ->
    A server 'sanhdrifx_net' already exists in the cluster but is disconnected from the
    primary server.
    Do you want to delete the pre-existing server record and then
    proceed with cloning? (y or n) ->y
    The record of RSS server 'sanhdrifx_net' is being deleted.
    Restoring clone server sanhdrifx_net from source server cmsantar01_net.
    Look at online log for status of clone server...
    [informix@sanhdrifx ~]$ ERROR: Cannot read '/home/informix/etc/authfile.cmsantar01_net' :
    No such file or bad permissions. (REMOTE_SERVER_CFG)

    WARNING: server initialization failed or timed out.
    Also check the message log, online.log, for errors.

    on log file show only information 
    09:54:53 Parameter's user-configured value was adjusted. (REMOTE_SERVER_CFG)

    file have 660 permissions and owner and group are informix.
    also defined S6_USE_REMOTE_SERVER_CFG 1 as specified on notes to activate the file

    Thanks for any help,

    SP



    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 32.  RE: ontape error

    Posted Thu July 23, 2020 06:45 AM
    Hi Sergio

    Any type of replication will require server/user level equivalence; it's not specifically an ifxclone requirement. Is using REMOTE_SERVER_CFG the policy in your organisation? If it is not, I would elect to use hosts.equiv as this has been a tried and trusted method for many a year now.

    ------------------------------
    Kirit Rana
    ------------------------------



  • 33.  RE: ontape error

    Posted Thu July 23, 2020 07:19 AM

    Hi Kirit,

    Thank you and all others for help, it is working now.

    I was trying to use REMOTE_SERVER_CFG as hosts.equiv is some old fashion...
    Anyway, just need to copy the file to the target andeverything work fine.

    Best regards,

    SP 



    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 34.  RE: ontape error

    Posted Thu July 23, 2020 07:36 AM
    Cool. You are now the master of ifxclone.

    ------------------------------
    Kirit Rana
    ------------------------------



  • 35.  RE: ontape error

    Posted Thu July 23, 2020 07:45 AM
    everything is difficult until we realize it!
    to be a master there is still a lot to learn :)

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 36.  RE: ontape error

    IBM Champion
    Posted Thu July 23, 2020 09:11 AM
    And now you have something you can teach! You are a master! B^)

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.