🛠 NAS Samba et conteneurs Docker sur NVMe

ODROID-M1 (Hardkernel) · avance · Schéma : IMG-odroid-m1-avance-3-odroidm1-nas-samba.svg — ODROID-M1 en serveur NAS : SSD NVMe et disque SATA 2,5 pouces partagés en Samba, conteneurs Docker, clients du réseau local

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

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

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials