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
- Login as root to a host where the Db2 pureScale Feature was installed.
- Ensure that your network topology is set up according to the requirements in the Network topology configuration support for Db2 pureScale environments topic.
- Ensure all hosts in the Db2 pureScale environment are at the latest Db2 fix pack level.
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.
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 command:
- Run the db2isetup command to launch the Db2 Instance Setup wizard.
- Proceed to the
Set up a Db2 instance
panel. Select the Create a Db2 instance option and click Next. - Add the instance owner and the fenced user in the
Set user information
panels and click Next. - 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 useinput
as the tiebreaker disk option value. - 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.
- 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 theInstName
parameter. The default value ofrlogin
is TRUE. You can see the current value ofrlogin
in the /etc/security/user file. You can modify the value ofrlogin
by issuing thechuser rlogin=true user_name
command. If you do not set therlogin
to TRUE for the username specified inInstName
, your Db2 pureScale instance creation might fail.
Example
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
- Add a second cluster caching facility.
- 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.
- Add any additional members to the instance.
- Start the instance.