Creating a Db2 pureScale instance in installations without an instance

Creating a Db2 pureScale instance in a Db2 pureScale environment is only required if you did not choose to create one during installation. Db2 pureScale Environments support only one Db2 pureScale instance.

Before you begin

About this task

If you installed Db2 pureScale Feature by using either the Db2 setup wizard or a response file, by default a Db2 pureScale instance is created. However, if you choose to not create the instance during installation, or, if you installed Db2 pureScale Feature by using the db2_install command, you must manually create the instance.

Important: To install with the command line, run the db2setup command with a response file to specify the installation options. To specify the response file, use the -r option and the response file path. The db2setup command has the benefit of being able to create a Db2 pureScale instance, and set up the cluster caching facilities and Db2 members.

Use this topic to create a Db2 pureScale instance after you install the Db2 pureScale Feature.

You can use the db2icrt command to create a Db2 pureScale instance with one cluster caching facility (CF) and one member. The db2icrt command must be issued on either the target CF host or the target member host. The host where the command is issued is referred to as installation-initiating host (IIH).

You can also use the db2isetup command to create an instance. The db2isetup command can also be used to create an instance with multiple hosts, whereas the db2icrt command can create an instance only on two hosts. Regardless of the command used to create the instance, additional hosts can be added by running the db2iupdt command with the -add option.

To ensure optimal performance for a Db2 pureScale instance, the priority level of the log writer engine dispatchable unit (EDU) db2loggw is adjusted to be higher than other EDUs. However, depending on the operating system, in order for this to happen, certain permissions need to be granted to the Db2 database manager. For details on these special permissions see topic Ensuring maximum DB2 workload management dispatcher scheduling accuracy .


Restrictions

When you create a Db2 pureScale instance by using the db2icrt command, you must specify one member and one CF. In a Db2 pureScale environment, the db2icrt command does not support a Lightweight Directory Access Protocol (LDAP) environment.

Procedure

To create a Db2 pureScale instance by using the db2isetup or db2icrt command:
  • To create a Db2 pureScale instance by using the db2isetup command:
    1. Run the db2isetup command to launch the Db2 Instance Setup wizard.
    2. Proceed to the Set up a Db2 instance panel. Select the Create a Db2 instance option and click Next.
    3. Add the instance owner and the fenced user in the Set user information panels and click Next.
    4. On the Set up a Db2 Cluster File System panel, specify the shared disk partition device path and the tiebreaker device path.
      Note: When you are creating a Db2 pureScale instance in a virtual machine (VM), you do not need to specify a tiebreaker disk. If you do not want to specify a tiebreaker disk, you must use input as the tiebreaker disk option value.
    5. Proceed to the Host List panel. Add the hosts that you want in the Db2 pureScale instance configuration. Hosts are validated as they are added to the list. After you add the hosts, click Next.
    6. Click Finish to perform the action.
  • To create a Db2 pureScale instance by using the db2icrt command:
    Run the db2icrt command to create the Db2 pureScale instance. The command syntax is as follows:
    db2icrt  -m <MemberHostName>  -mnet <Netname1> 
       -cf <CFHostName> -cfnet <CFNetname>
       -instance_shared_dev  <Shared_Device_Path_for_Instance>
       -tbdev <Raw_device_for_tiebreaker>
       -u <fencedID> 
       <instanceID>

    This syntax diagram is abbreviated for simplicity, see the db2icrt command reference for the full syntax and parameter descriptions. One of the host names specified must be the name of the host that you are running the db2icrt command from.

    Note:
    • If you have not set your communication protocols correctly, you might receive a SQL5043N error when issuing the db2start command. Ensure that you have correctly set the DB2COMM environment variable. Use the db2set -all command to view your environment settings. You can set the DB2COMM environment variable by running the following command: db2set DB2COMM=tcpip.
    • On AIX® operating systems, you must set the rlogin operating system attribute to TRUE for the instance owner specified in the InstName parameter. The default value of rlogin is TRUE. You can see the current value of rlogin in the /etc/security/user file. You can modify the value of rlogin by issuing the chuser rlogin=true user_name command. If you do not set the rlogin to TRUE for the username specified in InstName, your Db2 pureScale instance creation might fail.

Example

For example, use the db2icrt command to create a Db2 pureScale instance called db2sdin1 on the installation-initiating host, test1, and test2 (cluster caching facility) that use the shared disk /dev/hdisk1 (identifier on test1) as the tiebreaker and an existing file system /db2instance as the instance shared disk:
DB2DIR/instance/db2icrt
   -m test1 -mnet test1-ib0 
   -cf test2 -cfnet test2-ib0,test2-ib1,test2-ib2,test2-ib3
   -instance_shared_dev  /db2instance 
   -tbdev /dev/hdisk1 
   -u db2sdfe1
   db2sdin1

The test1-ib0 is the cluster interconnect netname for the test1 member host, the test2-ib0, test2-ib1, test2-ib2, and test2-ib4 are each a cluster interconnect netname for the test2 host. This example sets up the cluster caching facility on the test2 host and a Db2 member on the test1 host for the instance db2sdin1 associated with the Db2 installation under /DB2DIR. The cluster interconnect netnames test1-ib0 and test2-ib0 must be on the same IP subnet. The db2sdfe1 value is the fenced user and the db2sdin1 value is the Db2 pureScale instance owner.

What to do next

After creating your Db2 pureScale instance with the db2icrt command:
  1. Add a second cluster caching facility.
  2. Add any additional communication adapter ports to the CFs. This step is not required if all cluster interconnect netnames were specified during instance creation and while adding the second CF.
  3. Add any additional members to the instance.
  4. Start the instance.
You can add more hosts as members or as a second cluster caching facility by using the db2isetup command or the db2iupdt -add command. Additional communication adapter ports can be added to CFs with the db2iupdt -update command. You can also remove a member or cluster caching facility from your instance by using the db2iupdt -drop command.