Hi toradex,
We are working on verdin imx8mp with verdin development board. we are facing some issue with USB storage after hotplugging. Actually we tried to access the pendrive inside the python based application container. for that we tried to mounting the pendrive through “etc/fstab” and “etc/udisks2/mount_options.conf”. both methods are working only when the pendrive is inserted at booting time. after hotplugging the pendrive it returns the " Error 13: permission error". also i’m mounted the volume on docker-compose.yaml file. please find the attached results and files. pls provide the solution for my issue!
Board: Verdin Development board
SOC: verdin imx8mp 4gb
OS : torizon-core-docker-verdin-imx8mp-Tezi_6.8.1+build.25.tar
torizon@verdin-imx8mp-15229904:/media$ ls -ld SPEL64 drwxrwxrwx 2 torizon torizon 131072 Apr 22 10:37 SPEL64
before and after hotplug.
docker-compose.yml (2.5 KB)
Dockerfile (2.7 KB)
mount_options.conf (183 Bytes)
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?

Hello!
To access USB storage devices in a container on Torizon OS, you’ll need to configure device access and mounting correctly. Here’s a step-by-step guide to help you:
-
Configure Volume Mounts and Device Access: In your docker-compose.yml
file, ensure you have the appropriate volume mounts and device access configured. This is crucial for the container to interact with USB devices:
volumes:
- type: bind
source: /dev
target: /dev
This setup allows the container to access the device files necessary for USB communication.
-
Peripheral Access for Python Applications: If you’re working with Python applications, you need to configure peripheral access in the docker-compose.yml
file for both debug and release containers. The debug service should have more permissive access, while the release service should be more restrictive. This ensures that your application can interact with USB devices during development and production.
-
Build Your Container Image: When building your container image, ensure you’re using the correct base image and configurations in your Dockerfile. You can verify your setup with the following command:
docker run --rm -it -v /var/run/dbus:/var/run/dbus -v /dev:/dev <username>/container-name
This command helps you test the container’s ability to access USB devices.
For handling USB storage hotplug events, specific information might not be readily available in the provided sources. However, you can explore additional resources such as the Toradex Community and Toradex GitHub for more insights.
I hope this helps you set up USB storage access in your Torizon OS container. If you have any more questions, feel free to ask!
Best regards,
Toradex AI Assistant.