Results 1 to 13 of 13
  1. #1
    Join Date
    May 2007
    Posts
    56

    Unanswered:

    The fact you have your instance on an external storage is not a problem, actually most of people do, using SAN technology.
    The problem is moving just the instance, you are leaving behind a lot of DB2 footprint. When DB2 is installed and every time a DB2 instance is created or a fix pack is applied, there is a place in UNIX (any flavor) called The Global Registry which lives in /var/db2/global.reg.

    This register shows Db2 instances version, installed path, fix pack etc, you can obtain all this information typing:
    db2greg -dump (be careful changing anything using that command)
    - Also an instance sqllib has actually a symbolic link pointing to the real installed binary files , so check with db2level which path it is. You might get something like /opt/ibm/db2/V9.7, so check if you are moving that file systems (or copying) too.

    - Check /etc/services
    - do a ls -l on instance/sqllib

    Let me know what did you find out.

    Thx
    IBM Certified Database Administrator
    DB2 9 Advanced DBA for Linux, Unix and Windows

  2. #2
    Join Date
    Jul 2011
    Posts
    41

    Arrow i have a basic doubt about the db2 instance

    i have a basic doubt about the db2 instance

    if the db2 instance is on a external storage and when this storage is mounted on to a new server,how does this new server identify that it can access that instance

    I tried to duplicate the same instance user and the fenced user and now when i do a db2start i get the error : error while loading the shared libraries : libdb2e.se.1: cannot open shared object file :


    please help...its very important for me to understand this

  3. #3
    Join Date
    May 2007
    Posts
    56
    The fact you have your instance on an external storage is not a problem, actually most of people do, using SAN technology.
    The problem is moving just the instance, you are leaving behind a lot of DB2 footprint. When DB2 is installed and every time a DB2 instance is created or a fix pack is applied, there is a place in UNIX (any flavor) called The Global Registry which lives in /var/db2/global.reg.

    This register shows Db2 instances version, installed path, fix pack etc, you can obtain all this information typing:
    db2greg -dump (be careful changing anything using that command)
    - Also an instance sqllib has actually a symbolic link pointing to the real installed binary files , so check with db2level which path it is. You might get something like /opt/ibm/db2/V9.7, so check if you are moving that file systems (or copying) too.

    - Check /etc/services
    - do a ls -l on instance/sqllib

    Let me know what did you find out.

    Thx
    IBM Certified Database Administrator
    DB2 9 Advanced DBA for Linux, Unix and Windows

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You did not provide your DB2 version and OS, but from your post I am guessing that the OS is *nix.

    If you are going to have 2 servers that will act like an active-passive cluster that share the instance, then the instance home directory should be on the shared storage. The 2 servers should also be identical. You need to have the same exact entries in /etc/passwd and /etc/group for all DB2 objects, including UID and GID.

    Also note that the db2nodes.cfg file needs to change depending on which server is acting as the active node.

    Andy

  5. #5
    Join Date
    Jul 2011
    Posts
    41
    rmarzullo and ARWinner thank you for the reply...

    i was actually trying to setup the HA on shared disk for which i was following a db2 ref.doc

    OS:Linux
    DB2: 9.7.5
    SAN: Raid 4

    In my last post i got a clarification that the instance should lie on the common mount (/cm) which was not clear in the doc

    I had created the instance on the /cm from A now from B i was unable to point to the same instance where i am currently struck.

    1 . Do i have to move the files from this path "/opt/ibm/db2/V9.7" ?
    2. /etc/services has the entries of the db2instance with the current instance as primary and with the port number/tcp
    Last edited by divya.s; 05-03-12 at 03:08. Reason: Sorry it was a typo its not HADR HA

  6. #6
    Join Date
    Jul 2011
    Posts
    41
    for /etc/group should the UID numbers also be the same...becasue in my case they are different

  7. #7
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by divya.s View Post
    rmarzullo and ARWinner thank you for the reply...

    i was actually trying to setup the HADR on shared disk for which i was following a db2 ref.doc

    OS:Linux
    DB2: 9.7.5
    SAN: Raid 4

    In my last post i got a clarification that the instance should lie on the common mount (/cm) which was not clear in the doc.
    Shared disk for instance or data will not work for HADR. You were told that in another thread. With HADR, you could have shared disk for archive logs, but this is not necessary, and everthing else should have separate disk dedicated for each HADR database (usually on different servers).

    You can create a DB2 shared disk cluster, but not with HADR.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  8. #8
    Join Date
    Jul 2011
    Posts
    41
    "It was a typo its not HADR ON SHARED DISK its HA ON SHARED DISK"

    I have the instance on the Shared disk but i am unable to access the same instance from standby i get an error in db2start " error while loading the shared libraries : libdb2e.se.1: cannot open shared object file : "

  9. #9
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by divya.s View Post
    "It was a typo its not HADR ON SHARED DISK its HA ON SHARED DISK"

    I have the instance on the Shared disk but i am unable to access the same instance from standby i get an error in db2start " error while loading the shared libraries : libdb2e.se.1: cannot open shared object file : "
    I am not sure what is wrong, but I assume that you know you cannot access the same instance from both servers at the same time. Also, as mentioned above, the db2nodes.cfg has to be changed when a failover occurs.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  10. #10
    Join Date
    Jul 2011
    Posts
    41
    i am not accessing the same instance at the same time....the mount needs to umounted from primary and needs to be mounted on standby which i had done...

    On the standby i had only created the same instance and fence users..do i have to move any files physically from "/opt/ibm/db2/V9.7"?

  11. #11
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need to provide the contents of /etc/passwd and /etc/group for both servers (only the DB2 related entries). We need to see the local and shared disk structure and how you installed DB2 on each server.

    Andy

  12. #12
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Do some basic tests .

    a) Are uid, gid the same on both nodes
    b) is /etc/services the same
    c) are the db2 software levels the same and in the same location on both nodes
    d) are the operating system levels same

    if all these are correct, but you still cannot start the instance on the standby, then create a local home directory and create an instance and try starting it. this should tell you if your installation is correct.

    if you are using any cluster software, then remove them from the equation and do the takeover steps manually . [ remember to change db2nodes.cfg as marcus said above ]

    at this point, if you fail over does not work, then you have to look further into db2diag.log and /var/adm/log/messages


    hth
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  13. #13
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    hey divya,

    As suggested by all

    you should have uid,gid same on both ther servers.

    And i had the same setup once ...
    my approach was Server A , Server B, and SAN.

    db2 installed on bot Server A and B... DB is created on SAN. and now i did was cataloged the db in Server B.

    once if i unmount from A and remount from B it should work.
    Thus i have HA.

    Let me further details.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •