# Creating a namespace

**URL:** <https://discuss.aerospike.com/t/creating-a-namespace/3866>\
**Category:** Configuration\
**Created:** [February 18, 2017, 8:23pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866 "2017-02-18T20:23:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bayram](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/bayram/32/708_2.png) [@bayram](https://discuss.aerospike.com/u/bayram)\
**Post date:** [February 18, 2017, 8:23pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/1 "2017-02-18T20:23:51Z")

</div>

Suppose I have a cluster consisting of 4 nodes: N1, N2, N3, N4. I want to create a namespace. I specify my new namespace on N1 in aerospike.conf. So, I need to restart the whole cluster.

Q1: Do I have to specify the new namespace on N2, N3, N4 in aerospike.conf as well? I guess we don’t do we? The gossip protocol should disseminate the new namespace.

Q2: How do we restart the cluster? By simply restarting the aerospike daemon **/etc/init.d/aerospike restart**?

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [February 18, 2017, 9:47pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/2 "2017-02-18T21:47:09Z")

</div>

Does the cluster have existing namespace and data and you want a add a new namespace or is it a brand new cluster you want to start with one or more namespaces?

---

<div class="post-metadata">

**Author:** ![bayram](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/bayram/32/708_2.png) [@bayram](https://discuss.aerospike.com/u/bayram)\
**Post date:** [February 18, 2017, 10:06pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/3 "2017-02-18T22:06:44Z")

</div>

It is a brand new namespace. I tried **/etc/init.d/aerospike restart**. it worked. But I am not sure if it is the right way to restart the cluster. And what if the cluster has existing namespace and data and I want to add a new namespace?

I searched in documentation but couldn’t find info about how to restart a cluster.

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [February 18, 2017, 10:18pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/4 "2017-02-18T22:18:08Z")

</div>

**Namespace spans across all nodes.** Node - is an aerospike process. It runs on a server - VM or physical host. In production, you will run one node on one server. (For playing around, it is possible to start multiple nodes on same server and form a cluster by separating the IP addresses.)

In a brand new cluster, you must shutdown all nodes. Edit the config file in each node. Namespace definition for config parameters identified unanimous and static in each .conf file have to be identical for the cluster to form- for example replication-factor. Other parameters such as memory size may be different but that is a seriously bad idea. (BTW, Aerospike does not check namespace memory size you specify against actual available RAM. Burden is on you to go through capacity planning upfront.) So for practical purpose, each node should have identical namespace stanza - except for perhaps device name differences. I am assuming you are running one aerospike node (process) per server. The cluster forms by each node pointing to one or more different nodes in the mesh-seed-address-port config parameters.

Once you have correctly setup all config files, start each node one by one. All nodes should have the same namespaces defined for a proper cluster to form.

Use the search tool on this forum to understand all the nuances. There are plenty of knowledge base articles and discussions on this topic. Search for “Adding a Namespace”. Aerospike does not allow adding or deleting namespaces on an active cluster. Entire cluster has to be shutdown and there are other subtleties related to preserving existing data - non-trivial to add a namespace in a running production cluster.

Since you are setting a brand new cluster, I would do: /etc/init.d/aerospike stop (on all nodes) Then, edit config file on all nodes. Then, /etc/init.d/aerospike start (node by node)

However, plan upfront for what namespace(s) you will need before getting into production.

---

<div class="post-metadata">

**Author:** ![bayram](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/bayram/32/708_2.png) [@bayram](https://discuss.aerospike.com/u/bayram)\
**Post date:** [February 18, 2017, 10:35pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/5 "2017-02-18T22:35:04Z")

</div>

Thanks, now it’s clear. Nevertheless I should read and understand all the nuances.

---

<div class="post-metadata">

**Author:** ![pgupta](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/pgupta/32/2351_2.png) [@pgupta](https://discuss.aerospike.com/u/pgupta)\
**Post date:** [February 18, 2017, 10:59pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/6 "2017-02-18T22:59:18Z")

</div>

If you are at a point that you are seriously considering Aerospike, CE or EE, for production, you may want to explore [Aerospike Academy | Aerospike](http://www.aerospike.com/training/administration-operations/)

Otherwise, this discussion forum has lots of good material.

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [February 19, 2017, 3:31am UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/7 "2017-02-19T03:31:14Z")

</div>

The [3.11 announcement](http://www.aerospike.com/blog/whats-new-in-aerospike-3-11/) mentioned the ability to add a namespace without needing a cluster wide restart as being slated for 3.12.

---

<div class="post-metadata">

**Author:** ![bayram](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/bayram/32/708_2.png) [@bayram](https://discuss.aerospike.com/u/bayram)\
**Post date:** [February 19, 2017, 8:25am UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/8 "2017-02-19T08:25:14Z")

</div>

Good news! 🙂I am beginning to wonder about Aerospike’s stability though.

---

<div class="post-metadata">

**Author:** ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)\
**Post date:** [February 19, 2017, 9:30am UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/9 "2017-02-19T09:30:21Z")

</div>

What does that have to do with stability?

---

<div class="post-metadata">

**Author:** ![bayram](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/bayram/32/708_2.png) [@bayram](https://discuss.aerospike.com/u/bayram)\
**Post date:** [February 19, 2017, 10:06am UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/10 "2017-02-19T10:06:17Z")

</div>

A lot of changes from release to a release. So far only improvements and fixes. I hope there will be no a lot of depreciations, kind of “in previous version we did this way, but now we do it that way in a completely different way”. By stability I mean that when you migrate to a new version many features are deprecated or changed.

---

<div class="post-metadata">

**Author:** ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)\
**Post date:** [February 19, 2017, 10:57am UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/11 "2017-02-19T10:57:26Z")

</div>

That’s not what stability means in this context, but I understand your concern. The release notes are pretty clear, so it’s your choice as to when and if you update the version.

---

<div class="post-metadata">

**Author:** ![anushree](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@anushree](https://discuss.aerospike.com/u/anushree)\
**Post date:** [June 7, 2017, 9:54pm UTC](https://discuss.aerospike.com/t/creating-a-namespace/3866/12 "2017-06-07T21:54:30Z")

</div>

The ability to add/remove namespaces with rolling restart of the cluster is added starting server version 3.13.0.1 for both Community and Enterprise versions on [paxos-protocol](http://www.aerospike.com/docs/reference/configuration#paxos-protocol) version v5.

[AER-3485] - (KVS) Support adding/removing namespaces with rolling restart. [http://www.aerospike.com/download/server/notes.html#3.13.0.1](http://www.aerospike.com/download/server/notes.html#3.13.0.1)
