balena-supervisor
balena-supervisor copied to clipboard
The supervisor should automount removable storage and provide it to specified containers
The supervisor should mount both removable storage which is present at boot, and any hot-plugged storage and mount it into /media
on the OS.
Any services which specify the io.balena.features.external-storage
label should have the /media
directory mounted into the container (/media
being the container path too).
Automounting should be controlled via a host configuration variable (which defaults to true) BALENA_HOST_CONFIG_AUTOMOUNT
. This should also be exposed via the dashboard.
cc @kenna-smith @shaunmulligan @20k-ultra @szony
related https://github.com/balena-io/balena-io/issues/1888 and https://trello.com/c/447Z4Pq7/39-auto-mount-external-usb-storage-drives-in-os-if-they-have-a-specific-label
The Supervisor is started with --privileged flag so all that's needed to get udev events is to add ENV UDEV=on to the dockerfile.
No configurable toggle will be used just labels as decided in 01-14-2021 arch call.
Regarding mounted /dev
directory on containers by the OS https://github.com/balena-os/balena-engine/issues/125
[anujdeshpande] This issue has attached support thread https://jel.ly.fish/d5b1d2f5-e166-4023-9378-94d718e5d524
I believe this should be cross-linked here: https://github.com/balena-io/balena-io/issues/1288
If the Supervisor mounts the device in /media
and then mounts that folder into the containers, we should see if the containers are able to perform operations such as formatting because this would be a useful feature. The concern is that the device will be marked as "in use" so applications won't be able to format the drives.
[hades32] This issue has attached support thread https://jel.ly.fish/f79bab57-cc1f-4096-a855-d4da1d456cd9
[the-real-kenna] This issue has attached support thread https://jel.ly.fish/caee95cf-b9a0-4c34-97e1-02ec63107520