balena-supervisor icon indicating copy to clipboard operation
balena-supervisor copied to clipboard

The supervisor should automount removable storage and provide it to specified containers

Open CameronDiver opened this issue 4 years ago • 9 comments

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

CameronDiver avatar Nov 24 '20 15:11 CameronDiver

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

20k-ultra avatar Jan 13 '21 04:01 20k-ultra

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.

20k-ultra avatar Jan 13 '21 05:01 20k-ultra

No configurable toggle will be used just labels as decided in 01-14-2021 arch call.

20k-ultra avatar Jan 14 '21 18:01 20k-ultra

Regarding mounted /dev directory on containers by the OS https://github.com/balena-os/balena-engine/issues/125

pipex avatar Jan 18 '21 16:01 pipex

[anujdeshpande] This issue has attached support thread https://jel.ly.fish/d5b1d2f5-e166-4023-9378-94d718e5d524

jellyfish-bot avatar Jan 20 '21 07:01 jellyfish-bot

I believe this should be cross-linked here: https://github.com/balena-io/balena-io/issues/1288

tmigone avatar Jan 28 '21 14:01 tmigone

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.

20k-ultra avatar Jun 18 '21 20:06 20k-ultra

[hades32] This issue has attached support thread https://jel.ly.fish/f79bab57-cc1f-4096-a855-d4da1d456cd9

jellyfish-bot avatar Aug 05 '21 12:08 jellyfish-bot

[the-real-kenna] This issue has attached support thread https://jel.ly.fish/caee95cf-b9a0-4c34-97e1-02ec63107520

jellyfish-bot avatar May 16 '22 23:05 jellyfish-bot