🛠 NAS Samba et conteneurs Docker sur NVMe
Objectives
Turn the ODROID-M1 into a home mini-server: Samba sharing on the NVMe SSD (and the native SATA 3.0 port, 5 V power only) plus Docker containers. This is the use case that made the M1 successful: fast NVMe + Gigabit for under $100.
Hardware
- ODROID-M1 booted from NVMe (see the boot tutorial), 4 or 8 GB of LPDDR4
- 2.5" SATA SSD (3.5" drives require external power: the SATA port only provides 5 V)
- Gigabit Ethernet cable, local network
Complete code
#!/usr/bin/env bash
set -euo pipefail
# 1) Disque de données formaté et monté sur /srv/nas
sudo mkfs.ext4 /dev/nvme0n1p3 || true # partition dédiée, attention aux données
sudo mkdir -p /srv/nas && sudo mount /dev/nvme0n1p3 /srv/nas
# 2) Partage Samba
sudo apt-get install -y samba
sudo smbpasswd -a projet
sudo tee -a /etc/samba/smb.conf <<'EOF'
[nas]
path = /srv/nas
writable = yes
valid users = projet
EOF
sudo systemctl restart smbd
# 3) Docker sur le même disque
curl -fsSL https://get.docker.com | sudo sh
sudo docker run -d --name watchdog --restart unless-stopped \
-v /srv/nas:/data busybox tail -f /dev/null
Expected verification
From a PC: smb://m1-address/nas opens and is writable; docker ps shows the container running; a file transfer reaches the Gigabit limit (~110 MB/s) without saturating the 4 A55 cores.
Common errors
- Plugging a 3.5" drive into the board's SATA port: it won't spin, the connector only delivers 5 V.
- Forgetting smbpasswd after creating the system user: access denied despite the share.
- Running mkfs on the wrong partition and destroying the system: always check lsblk first.
- arm64 Docker images not found: check the architecture (uname -m must return aarch64) and choose multi-arch images.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash