Create a Zone
After starting the Admin command line interface (CLI) and naming your data store, you need to create at least one zone. It is possible, and even desirable, to create more than one zone. Because zones are complete copies of your data store, using multiple zones improves your data store's availability. This section describes an installation with a single zone. For more directions about creating a store deployment with multiple zones, see Configuring with Multiple Zones.
Note:
Once you add Storage Nodes to a zone, you cannot remove the zone from your data store.
To create a zone, use the
plan deploy-zone
with this usage:
plan deploy-zone -name <zone name>
-rf <replication factor>
[-type [primary | secondary]]
[-arbiters | -no-arbiters ]
[-json ]
[-master-affinity | -no-master-affinity]
[-plan-name <name>] [-wait] [-noexecute] [-force]
where:
-
-arbiters
Specifies that you can allocate Arbiter Nodes on the Storage Node in the zone.
-
-no-arbiters
Specifies that you cannot allocate Arbiter Nodes on the Storage Node in the zone. You can specify this flag only on a primary zone.
Note:
Only primary zones can host Arbiter Nodes.
-
-rf
A number specifying the Zone Replication Factor. A primary zone can have a Replication Factor equal to zero.
-
-name
Identifies the zone name, as a string.
-
-json
Formats the command output in JSON.
Note:
Only primary zones can host Arbiter Nodes.
-
–master-affinity
Indicates that this zone is a Master Affinity zone.
-
-no-master-affinity
Specifies that this zone is not a Master Affinity zone.
-
-type
Specifies the type of zone to create. If you do not specify a –type, the
plan
utility creates a Primary zone.
For more information on Primary and Secondary Replication Factors, see Configuring with Multiple Zones.
When you execute the plan
deploy-zone
command, the CLI returns the
plan number. It also returns instructions on how
to check the plan's status, or to wait for it to
complete. For example:
kv-> plan deploy-zone -name "Boston" -rf 1 -wait
Output:Executed plan 1, waiting for completion...
Plan 1 ended successfully
You can show the plans and their
status using the show plans
command.
kv-> show plans
Output:1 Deploy Zone (1) SUCCEEDED
A zero Replication Factor zone is useful to host only Arbiter Nodes. You would add zero capacity Storage Nodes to this zone in order to host Arbiter Nodes. For more information see Deploying an Arbiter Node Enabled Topology.
You can also create Master Affinity Zones, which let you prioritize master nodes in primary zones. See Master Affinity Zones for details.