Scaling out your IBM Db2 Warehouse MPP cluster

You can increase the capacity and performance of your cluster by adding nodes to your deployment, with only a minimal interruption to your database operations.

Before you begin

If any of the new nodes were previously a part of a Db2® Warehouse cluster, ensure that any old Db2 Warehouse containers and images were removed.

Ensure that your system meets the hardware prerequisites described in IBM Db2 Warehouse prerequisites.

Ensure that your system meets the prerequisites described in Getting container images.

About this task

The following restrictions apply:
  • You cannot use this procedure to add nodes to an SMP deployment to make it an MPP deployment.
  • You can add data nodes only. The host that you specified as the head node must retain that designation.
  • You cannot have fewer than three nodes (one head node and two data nodes) in your cluster. The maximum number of nodes is either 24 (one head node and 23 data nodes) or 60 (one head node and 59 data nodes), depending on the number of data partitions that were allocated when you deployed Db2 Warehouse. For more information, see Scaling your IBM Db2 Warehouse deployment.
  • All containers on all nodes in the cluster must be at the same level.

To perform this task, you require root authority.

Procedure

  1. On the head node, stop the Db2 Warehouse services by issuing the following command:
    docker exec -it Db2wh stop
  2. On each node, stop the Db2 Warehouse container by issuing the following command:
    docker stop Db2wh
  3. On each node, remove the Db2 Warehouse container by issuing the following command:
    docker rm Db2wh
  4. In the /mnt/clusterfs/nodes configuration file, include the new nodes’ host and IP details.
  5. On each node (new and preexisting), update the /etc/hosts file to include the details for every node in the deployment.
  6. Log in to Docker on each node host by using your API key:
    echo <apikey> | docker login -u iamapikey --password-stdin icr.io
    where <apikey> is the API key that you created as a prerequisite in Getting container images.
  7. On each node, pull, create, and initialize the Db2 Warehouse container by issuing the applicable docker run command from the following list:
    • For a container for POWER® LE hardware:
      docker run -d -it --privileged=true --net=host --name=Db2wh -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-ppcle
      
    • For a container for z Systems® hardware:
      docker run -d -it --privileged=true --net=host --name=Db2wh -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-s390x
    • For a container for x86 hardware:
      docker run -d -it --privileged=true --net=host --name=Db2wh -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 icr.io/obs/hdm/db2wh_ee:v11.5.6.0-db2wh-linux
  8. On each new node, review the log output to make sure that the container started successfully. Issue the following command:
    docker logs -–follow Db2wh