# What is the folder of ddata-{akka-system-name}-replicator-2551 used for?

**URL:** https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837
**Category:** Akka Libraries
**Tags:** akka-cluster
**Created:** [February 9, 2021, 7:18am UTC](https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837 "2021-02-09T07:18:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![billxiao](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/billxiao/32/1699_2.png) [@billxiao](https://discuss.akka.io/u/billxiao)
#### Post date: [February 9, 2021, 7:18am UTC](https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837/1 "2021-02-09T07:18:22Z")

</div>

I’m using akka cluster, akka sharding and akka persistence for my system. When the system is running, I notice there is always a folder called ddata-{akka-system-name}-replicator-2551 created in the current working directory. I guess it’s used for storing akka persistence information, because if I experimentally delete the folder, my persistent actor cannot restore its state when the cluster restarts.  
So my question here is if I deploy my akka cluster into Kubernetes, should I use k8s StatefulSet to use stable persistent volume to keep the ddata folder there between Pod restarts? I’ve referred to all akka kubernetes examples online, but all are using regular k8s stateless ReplicaSet/Deployment. I don’t find an akka persistence / k8s example so far.

---

<div class="post-metadata">

### Author: ![domdorn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/domdorn/32/184_2.png) [@domdorn](https://discuss.akka.io/u/domdorn)
#### Post date: [February 9, 2021, 10:03am UTC](https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837/2 "2021-02-09T10:03:08Z")

</div>

You might have remember-entities enabled?

> When `rememberEntities` is enabled, whenever a `Shard` is rebalanced onto another node or recovers after a crash, it will recreate all the entities which were previously running in that `Shard` .  
> [Cluster Sharding • Akka Documentation](https://doc.akka.io/docs/akka/current/typed/cluster-sharding.html)

Or if you use distributed-data, this file will also be created.

---

<div class="post-metadata">

### Author: ![domdorn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/domdorn/32/184_2.png) [@domdorn](https://discuss.akka.io/u/domdorn)
#### Post date: [February 9, 2021, 11:19am UTC](https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837/3 "2021-02-09T11:19:43Z")

</div>

Sorry, just read your question again+ now in detail.  
If its important for your pod to be able to restart its state, you’ll need to either attach some persistence to it (like you described) or switch to an eventsourced-store, e.g.

```auto
akka.cluster.sharding.remember-entities-store = eventsourced

```

else if the pod looses its directory between redeploys, the state (which actors are running) is also gone.

> So my question here is if I deploy my akka cluster into Kubernetes, should I use k8s StatefulSet to use stable persistent volume to keep the ddata folder there between Pod restarts

I’d say: yes

---

<div class="post-metadata">

### Author: ![billxiao](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/billxiao/32/1699_2.png) [@billxiao](https://discuss.akka.io/u/billxiao)
#### Post date: [February 10, 2021, 3:20am UTC](https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837/4 "2021-02-10T03:20:48Z")

</div>

Hi Dominik,  
Many thanks. You pointed me in the right direction. I’ll use K8s StatefulSet with Persistent Volume to store the ddata that “akka.cluster.sharding.remember-entities = on” needs.  
I also found the setting of akka.cluster.sharding.distributed-data.durable.lmdb.dir to set a location for the ddata, instead of relying on default directory. So I can put ddata into any mount point of Persistent Volume in container, that’s very convenient.

---

<div class="post-metadata">

### Author: ![patriknw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/patriknw/32/89_2.png) [@patriknw](https://discuss.akka.io/u/patriknw)
#### Post date: [February 10, 2021, 2:56pm UTC](https://discuss.akka.io/t/what-is-the-folder-of-ddata-akka-system-name-replicator-2551-used-for/7837/5 "2021-02-10T14:56:22Z")

</div>

If you already use Akka Persistence for other reasons (EventSourcedBehavior or PersistentActor) I would recommend that you use the eventsourced option for the remember-entities also. More reliable and you don’t have to deal with the persistent volumes and unique directory names.
