You can reduce the capacity of your cluster by removing nodes from your deployment.
Before you begin
The image container is in IBM® Cloud Container Registry. To pull a Db2® Warehouse container image, see Getting container images.
About this task
All currently deployed nodes must be at the same level.
Restriction:
- You cannot have fewer than three nodes in your cluster.
- You can remove data nodes only. The host that you specified as the head node must retain that
designation.
To perform this task, you require root authority.
Procedure
-
On the head node, stop the Db2 Warehouse services
by issuing the following command:
docker exec -it Db2wh stop
-
On each node, stop the container by issuing the following command:
-
On each node, remove the Db2 Warehouse container by
issuing the following command:
-
In the /mnt/clusterfs/nodes configuration file, remove the entries for the
nodes that you no longer want.
-
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.
-
On each node, create and initialize the Db2 Warehouse container by issuing the applicable command:
- 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
-
On the node hosts that you removed from the cluster, remove the Db2 Warehouse images. If they remain on the hosts, you
cannot re-add them to your cluster later.