You can increase the capacity of a Storage Node by adding additional hard
disks to the machine. Such a configuration permits the placement of each Replication
Node on its own disk and ensures that the Replication Nodes on the SN
are not competing for I/O resources. The location of this directory on its disk
can be specified via the storagedir
parameter.
The following example demonstrates deploying a new store and adding two more disks to a Storage Node, increasing the capacity from 1 to 3:
Create, start and configure the new store.
Create the new store:
java -Xmx&javamxvalue; -Xms&javamxvalue; \ -jar KVHOME/lib/kvstore.jar makebootconfig \ -root KVROOT \ -host node20 -port 5000 -admin 5001 \ -harange 5010,5030 \ -capacity 1 \ -memory_mb 200 \ -store-security none \ -storagedir /disk1/ondb/data
Start the new store:
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar start \ -root KVROOT&
Configure the new store:
java -Xmx&javamxvalue; -Xms&javamxvalue; \ -jar KVHOME/lib/kvstore.jar runadmin \ -port 5000 -host node20 kv-> configure -name kvstore Store configured: kvstore
Create a zone. Then create an administration process on a specific host:
plan deploy-zone -name Houston -rf 1 -wait Executed plan 1, waiting for completion... Plan 1 ended successfully plan deploy-sn -znname "Houston" -port 5000 -wait -host node20 Executed plan 2, waiting for completion... Plan 2 ended successfully
plan deploy-admin -sn sn1 -port 5001 -wait Executed plan 3, waiting for completion... Plan 3 ended successfully
Create a topology, preview it, and then deploy it:
topology create -name 1x1 -pool AllStorageNodes -partitions 120 Created: 1x1
topology preview -name 1x1 Topology transformation from current deployed topology to 1x1: Create 1 shard Create 1 RN Create 120 partitions shard rg1 1 new RN : rg1-rn1 120 new partitions
plan deploy-topology -name 1x1 -wait Executed plan 4, waiting for completion... Plan 4 ended successfully
Suppose two more disk drives were added to the Storage Node, mounted
as disk2
and disk3
. Add the storage
directories using the plan change-storagedir
command.
kv-> plan change-storagedir -sn sn1 -storagedir /disk2/ondb/data \ -add -wait Executed plan 5, waiting for completion... Plan 5 ended successfully
kv-> plan change-storagedir -sn sn1 -storagedir /disk3/ondb/data \ -add -wait Executed plan 6, waiting for completion... Plan 6 ended successfully
Change the capacity equal to the total number of disks now available on the Storage Node (3).
kv-> plan change-parameters -service sn1 -wait -params capacity=3 Executed plan 7, waiting for completion... Plan 7 ended successfully
You need to perform last two steps on all the Storage Nodes (in your cluster) to add the disk drives and increase the capacity of each Storage Node. In this case, it is a single node deployment, so the topology is now ready to be redistributed.
Redistribute your topology to expand the cluster in order to use the new capacity (3) of the Storage Node.
kv-> topology clone -current -name 1x3 Created 1x3
kv-> topology redistribute -name 1x3 -pool AllStorageNodes Redistributed: 1x3
kv-> topology preview -name 1x3 Topology transformation from current deployed topology to 1x3: Create 2 shards Create 2 RNs Migrate 80 partitions shard rg2 1 new RN : rg2-rn1 40 partition migrations shard rg3 1 new RN : rg3-rn1 40 partition migrations
kv-> plan deploy-topology -name 1x3 -wait Executed plan 8, waiting for completion... Plan 8 ended successfully