Increasing Storage Node Capacity
You can increase the capacity of a Storage Node by adding additional hard disks. Adding hard disks to a Storage Node permits the placement of each Replication Node on its own disk, ensuring that the Replication Nodes on the SN are not competing for I/O resources. Specify the location of the storage directory on the new disk using the storagedir
parameter.
Note:
When you specify a storage directory, Oracle strongly recommends you also specify the storage directory size using the -storagedirsize
parameter. See Managing Storage Directory Sizes for details. The system uses the configured directory sizes to enforce disk usage. Be sure to specify a storage directory size for every storage node in the store.
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 -Xmx64m -Xms64m \ -jar KVHOME/lib/kvstore.jar makebootconfig \ -root KVROOT \ -host node20 -port 5000 \ -harange 5010,5030 \ -capacity 1 \ -memory_mb 200 \ -storagedir /disk1/ondb/data
-
Create and copy the security directory:
java -Xmx64m -Xms64m \ -jar kv/lib/kvstore.jar \ securityconfig config create -root KVROOT -kspwd password Created files KVROOT/security/security.xml KVROOT/security/store.keys KVROOT/security/store.trust KVROOT/security/client.trust KVROOT/security/client.security KVROOT/security/store.passwd (Generated in CE version) KVROOT/security/store.wallet/cwallet.sso (Generated in EE version) Created
-
Start the new store:
java -Xmx64m -Xms64m \ -jar KVHOME/lib/kvstore.jar start \ -root KVROOT &
-
Configure the new store:
java -Xmx64m -Xms64m \ -jar KVHOME/lib/kvstore.jar runadmin \ -port 5000 -host node20 \ -security KVROOT/security/client.security
Output:kv-> configure -name kvstore
Store configured: kvstore
-
-
Create a zone. Then create an administration process on a specific host:
Output:kv-> plan deploy-zone -name Houston -rf 1 -wait
Executed plan 1, waiting for completion... Plan 1 ended successfully
Output:kv-> plan deploy-sn -znname "Houston" -port 5000 -wait -host node20
Executed plan 2, waiting for completion... Plan 2 ended successfully
Output:kv-> plan deploy-admin -sn sn1 -port 5001 -wait
Executed plan 3, waiting for completion... Plan 3 ended successfully
-
Create the storage node pool. Then add the storage node to the pool:
kv-> pool create -name AllStorageNodes
kv-> pool join -name AllStorageNodes -sn sn1
-
Create a topology, preview it, and then deploy it:
Output:kv-> topology create -name 1x1 -pool AllStorageNodes -partitions 120
Created: 1x1
Output:kv-> 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
Output:kv-> plan deploy-topology -name 1x1 -wait
Executed plan 4, waiting for completion... Plan 4 ended successfully
-
Add two more disk drives to the Storage Node, mounted as
disk2
anddisk3
. Add the storage directories using theplan change-storagedir
command. Be sure to add the Storage Directory size, such as-storagedirsize “1 tb”
.
Output:kv-> plan change-storagedir -sn sn1 -storagedir /disk2/ondb/data \ -storagedirsize "1 tb" -add -wait
Executed plan 5, waiting for completion... Plan 5 ended successfully
Output:kv-> plan change-storagedir -sn sn1 -storagedir /disk3/ondb/data \ -storagedirsize "1 tb" -add -wait
Executed plan 6, waiting for completion... Plan 6 ended successfully
Note:
Because we specified storage directory sizes in the previous example, it is necessary to provide that information to your other nodes if you have not already done so. See Managing Storage Directory Sizes for more information.
-
Change the capacity equal to the total number of disks now available on the Storage Node (3).
Output:kv-> plan change-parameters -service sn1 -wait -params capacity=3
Executed plan 7, waiting for completion... Plan 7 ended successfully
Note:
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.
Output:kv-> topology clone -current -name 3x1
Created 3x1
Output:kv-> topology redistribute -name 3x1 -pool AllStorageNodes
Redistributed: 3x1
Output:kv-> topology preview -name 3x1
Topology transformation from current deployed topology to 3x1: 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
Output:kv-> plan deploy-topology -name 3x1 -wait
Executed plan 8, waiting for completion... Plan 8 ended successfully