# Create overlay in /data for my application

**URL:** <https://hub.mender.io/t/create-overlay-in-data-for-my-application/6678>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [March 22, 2024, 10:29am UTC](https://hub.mender.io/t/create-overlay-in-data-for-my-application/6678 "2024-03-22T10:29:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amin](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Amin](https://hub.mender.io/u/Amin)\
**Post date:** [March 22, 2024, 10:29am UTC](https://hub.mender.io/t/create-overlay-in-data-for-my-application/6678/1 "2024-03-22T10:29:20Z")

</div>

Hello,

Basically I am trying to achieve a delta update on a rpi4 (so rootfs in read only).  
I have an application which require read/write capabilities. So I managed to add a script + systemd services that create an overlay for /etc (for network configuration files) and /usr/share (where my application is stored):

```auto
#!/bin/bash

/bin/mount none -t overlay -o lowerdir=/etc,upperdir=/data/etc,workdir=/data/work_etc /etc
/bin/mount none -t overlay -o lowerdir=/usr,upperdir=/data/usr,workdir=/data/work_usr /usr

```

Is this best practices ? Is it going to change my rootfs checksum so i will not be able to perform delta updates anymore ?

Thank you.

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ruben/32/565_2.png) [@ruben](https://hub.mender.io/u/ruben)\
**Post date:** [March 25, 2024, 6:32am UTC](https://hub.mender.io/t/create-overlay-in-data-for-my-application/6678/2 "2024-03-25T06:32:20Z")

</div>

I do the same here. Don’t know if it is best practice, for me it works 🙂

Do you know about [openembedded-core/meta/recipes-core/volatile-binds/volatile-binds.bb at master · openembedded/openembedded-core · GitHub](https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-core/volatile-binds/volatile-binds.bb)

If you create a bbappend for this, you just have to extend `VOLATILE_BINDS` variable with your overlays and no custom scripting or services are needed
