Monday, August 30, 2004

DB2 working under Solaris 10 Zones

(UPDATE ON MARCH 13, 2007: This entry is more than two years old please refer to the new entry for more information on DB2 V8.2 in Solaris 10 Zones )


DB2 on Solaris

NOTE: Following is not an offical supported configuration yet.


I finally got around to try DB2 V8.1 on Solaris 10 Zones (global zone as well as local Zone) using build 62.

# uname -a
SunOS testbed 5.10 s10_62 sun4u sparc SUNW,Ultra-5_10
#
# zoneadm list -iv
ID NAME STATUS PATH
4 testbed running /
#




Generally you have to first use db2osconf to get the right kernel parameters to create a DB2 instance, add them to /etc/system and then reboot the system. However since the kernel parameters have changed a lot in Solaris 10 (all for better), I did not use db2osconf and blindly put them into /etc/system. Anyway for my test I did not modify the /etc/system at all. (Plus db2osconf won't work in local zone anyway since the concept of modifying kernel parameters does not apply to localzones.)


I used the command line install of DB2 V8.1. The Install of DB2 succeeds, however when I used db2icrt to create instance it failed with the following error:


DBI1030E Kernel parameter MSGMAX must be set to 65535


One of DB2 instance creation script probes using 'sysdef' to get the value of MSGMAX and MSGMNB kernel parameters. Unfortunately in Solaris 10 these values are not tunable throught /etc/system and it defaults to 65535. Also sysdef no longer reports these values as they are not tunables anymore. (Many of these resource control paramters are now process specific) The script therefore fails in Solaris 10 (global-zone or local-zone)


So I open /opt/IBM/db2/V8.1/instance/db2iutil script using my favorite editor (vi) and search for 'sysdef' in it, modify it such that if does not find MSG* kernel parameter in the sysdef output it should not fail and continue. Also the default value of these parameters not found in sysdef (MSGMAX,MSGMNB) should be 65535 instead of zero. I modify these default values (I am working with IBM Toronto Labs and it will be resolved in a later fixpack hopefully) and saved the script file (as root) (Remember!!! Always make a backup copy :-) )


Once I rectify db2iutil, the related db2icrt scripts works under global-zone as well as local-zone. And then I went on to use Control Center, Sample database, etc and everything seems to work fine. If you are more interested in DB2 on Solaris features let me know and I will put out more blog entries on it.




3 comments:

Jignesh K. Shah said...

What's your DB2 version?
Do you have anything in /etc/system (global zone restrictions)? Also are you using any "restraints" on your zones (resource pools, processor limits?)
The problem looks like coming from a custom client? Is that so? Is the client trying to access any kernel parameters or kmem structures? Anything that tries to query the kernel structures will typically fail in local zones.

Sudhir Mohith said...

You may also want to know that that an entry for db2c_db2inst1 in /etc/services is also left out as part of the db2setup failing on Solaris 10. So this manual step is required along with the db2icrt command following the db2iutil update.
Sudhir

Anonymous said...

Hi jignesh,
As sysedf doesn't report the kernal param values like shmmax,shmmin etc., what is the alternative command to see those values which are set ?
Thx