Create a Zone

A zone is a logical grouping of Storage Nodes sharing a physical location (for example, a floor, or a data center building). Typically, each zone has redundant or backup power supplies, redundant data communication connections, environmental controls (for example: air conditioning, fire suppression), and security devices.

There are two types of zones — primary and secondary. Primary zones are the default. They contain nodes that can serve as masters or replicas. Secondary zones contain nodes that can serve only as replicas. You can use secondary zones to make a copy of the data available at a distant location, or to maintain an extra copy of the data to increase redundancy or read capacity.

After 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 how to create a single zone. For details on creating multiple zones, see Create Multiple Zones.

To create a zone, use the plan deploy-zone. To know more about plans, see Using Plans.

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. You can specify this flag only on a primary zone as only primary zones can host Arbiter Nodes.

  • -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 as only primary zones can host Arbiter Nodes.

  • -rf

    A number specifying the Zone Replication factor, which is the number of copies, or replicas, maintained in a zone. To determine an appropriate value for this, see Replication Factor. A primary zone can have a Replication factor equal to zero. A zero Replication factor zone is useful to host only Arbiter Nodes. For more information see Deploying an Arbiter Node Enabled Topology.

  • -name

    Identifies the zone name, as a string.

  • -json

    Formats the command output in JSON.

  • -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 details on the parameters of this command, see plan in Admin CLI Reference.

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
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
1 Deploy Zone (1) SUCCEEDED