# Using a second drive

**URL:** <https://forums.balena.io/t/using-a-second-drive/378293>\
**Category:** Product support\
**Created:** [July 9, 2026, 12:20pm UTC](https://forums.balena.io/t/using-a-second-drive/378293 "2026-07-09T12:20:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pinter](https://avatars.discourse-cdn.com/v4/letter/p/a87d85/32.png) [@pinter](https://forums.balena.io/u/pinter)\
**Post date:** [July 9, 2026, 12:20pm UTC](https://forums.balena.io/t/using-a-second-drive/378293/1 "2026-07-09T12:20:16Z")

</div>

Quick question, are there any guides for how to use a second drive on a balena device? I want to boot off an SD card and I will have an NVMe plugged in to the device. I would like one of my containers to access that drive to store its data.

TY

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [July 9, 2026, 7:25pm UTC](https://forums.balena.io/t/using-a-second-drive/378293/2 "2026-07-09T19:25:48Z")

</div>

There is some information about this in the docs: [Communicate outside the container | balena docs](https://docs.balena.io/learn/develop/runtime#mounting-external-storage-media)

Note that some examples may use udev from the balenalib base images - those have been deprecated in favor of official base images. If you don’t have your own udev replacement, you can use the script from our old base images: [base-images/balena-base-images/aarch64/debian/buster/build/entry.sh at master · balena-io-library/base-images · GitHub](https://github.com/balena-io-library/base-images/blob/master/balena-base-images/aarch64/debian/buster/build/entry.sh)

---

<div class="post-metadata">

**Author:** ![mpilone](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@mpilone](https://forums.balena.io/u/mpilone)\
**Post date:** [July 13, 2026, 5:41pm UTC](https://forums.balena.io/t/using-a-second-drive/378293/3 "2026-07-13T17:41:23Z")

</div>

FWIW, the page referenced says:

> Note that currently it’s not possible to share a mounted device across multiple containers.

However, I was able to mount an NVMe drive using a UDEV rule injected into the balena image and then use that mount in multiple containers. Adding the UDEV rule looks like roughly:

```auto
 UDEV_RULE="ACTION==\"add\", SUBSYSTEMS==\"nvme\", KERNEL==\"nvme[0-9]n[0-9]p1\", ENV{ID_FS_USAGE}==\"filesystem\", RUN{program}+=\"/usr/bin/systemd-mount --no-block --automount=yes --bind-device --options=noexec,nosuid,nodev,sync --collect \$devnode /run/mount/nvme\""

  jq --arg r "$UDEV_RULE" '.os.udevRules["80-myapp-nvme"] = $r' $IMAGE_CONFIG > ${IMAGE_CONFIG}.new && mv ${IMAGE_CONFIG}.new ${IMAGE_CONFIG}

  $BALENA_CMD config inject --drive "$IMAGE" $IMAGE_CONFIG

```

Then, in my docker-compose.yml, I have:

```auto
volumes:
  nvme-shared:
    driver: local
    driver_opts:
      type: none
      o: bind,rshared
      device: /run/mount

```

So far that seems to work well to allow the same volume to be used in multiple containers.

-mike
