brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: map an unassigned device into a container with a Slave access mode

Docker
~/tips/tip-unraid-docker-slave-access-mode

cat ~/tips/tip-unraid-docker-slave-access-mode.md

Make a container see a disk outside the array by picking a Slave access mode.

A USB disk or a spare SSD outside the array is handy for scratch space or a quick import into a container. Map it like any other folder and the container may just see an empty directory.

In the container template, every volume mapping has three parts: the container path, the host path and the access mode. For normal shares you pick read-only or read/write. The Unraid docs add one specific note for devices outside the array:

set the access mode to a “Slave” option to ensure proper detection

So when you edit the container and add a path, you set the host path to wherever the device is mounted, for example /mnt/disks/<device>, a container path like /import, and then choose one of the Slave options in the Access Mode dropdown instead of plain read/write. A Jellyfin or Nextcloud container can then read from /import as if it were any other folder.

The other rule for mappings still applies. Use the most restrictive mode that still lets the container work. If the app only reads from the disk, I’d pick the read-only flavour of Slave and keep the write option for when the app really has to write there.

Two more details from the same list in the docs: paths are case sensitive, and host paths are created automatically if they do not exist when the container starts. The caveat is that second one. If the device is not mounted yet when the container starts, a typo or a missing mount gives you a fresh empty folder instead of an error, so check the path before you blame the app.

Further reading: Unraid docs: Managing & customizing containers

More Docker tips ONBUILD RUN /usr/local/bin/python-build --dir /app/src SHELL ["/bin/bash", "-c"] docker commit <container> myname/testimage:version3 docker import /path/to/exampleimage.tgz docker compose events All Docker tips (192) All topics

Link