Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
SD Card Auto-Mount Points in Torizon OS 7.x
In Torizon OS, external storage devices like SD cards are automatically mounted under /media directory, not /mnt/sdcard (1). The documentation shows that when an external storage device is inserted, it gets automatically mounted at /media (1).
Automatic Mounting Behavior
When you insert an SD card, the system automatically creates mount points based on the device’s label or UUID under /media (1). For example, if your SD card has a label, it would appear as /media/<label> (1).
Docker Volume Binding
To bind an SD card mount point as a Docker volume, you have several options:
Option 1: Bind Mount with Propagation
For dynamic mounting scenarios where the SD card might be inserted after the container starts, you should use bind mount propagation (2):
volumes:
- type: bind
source: /media
target: /media
bind:
propagation: shared
(2)
This configuration allows the container to see new mounts that appear under /media after the container has started (2).
Option 2: Static Mount Point
If you know the SD card will be present at container startup, you can mount it directly:
volumes:
- /media/<your-sd-label>:/app/data
Permissions and Access
User Permissions
The default torizon user in Toradex containers is mapped to several groups that provide hardware access (3). However, for SD card write access, you may need to ensure proper permissions (2).
File System Permissions
By default, USB/SD devices mount with specific permissions (2). For write access from containers, you may need to:
-
Use the torizon user: Run your application as the torizon user rather than root when possible (3)
-
Configure mount options: For FAT32 filesystems, you might need to set proper uid and gid options in /etc/fstab to ensure the torizon user can write to the device (2):
/dev/sda1 /media/card auto defaults,sync,auto,nofail,uid=1000,gid=1000 0 0
(2)
Best Practices
- Avoid privileged mode: Don’t run containers in privileged mode just for storage access (3)
- Use specific mount points: Rather than mounting entire
/dev directory, mount only what you need (3)
- Consider reliability: Ensure your application handles cases where the SD card might be removed (1)
Security Considerations
Be aware that storing application data on removable media has security implications, as anyone with physical access can remove and examine the SD card (1).
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.