Data volume
The second disk as one ext4 partition, mounted at /srv by UUID, holding stacks, container data and backups.
Names and addresses are placeholders. The list says what each one stands for.
What it does here
Everything that matters lives on /srv: compose files, container data, the Docker image store, and local backup staging. The OS disk can be reinstalled without touching any of it.
Canonical setup
One GPT partition, an ext4 filesystem, and an fstab line that mounts it by UUID. Device names like /dev/sdb can change between boots; UUIDs don't.
sudo parted /dev/nvme0n1 --script mklabel gpt mkpart primary ext4 0% 100%
sudo mkfs.ext4 -L data /dev/nvme0n1p1
sudo blkid /dev/nvme0n1p1Upstream: fstab on the Debian wiki.
In this build
- Mounted at /srvEvery later card assumes this path.
- noatimeReads don't trigger a write.
- Three top-level folders
/srv/stacksfor compose files (owned by you),/srv/datafor container data,/srv/backupsfor local backup staging. - The device is nvme0n1On this box the data drive is NVMe. Use your own name from
lsblk.
If the drive already has a full-disk partition from an earlier life, blkid shows it, and you can skip parted and format that partition.
sudo mkdir -p /srv
echo 'UUID=<the-uuid-from-blkid> /srv ext4 defaults,noatime 0 2' | sudo tee -a /etc/fstab
sudo systemctl daemon-reload
sudo mount -a && df -h /srvsudo mkdir -p /srv/stacks /srv/data /srv/backups
sudo chown -R youruser:youruser /srv/stacksSeams
Where this meets the rest of the build. Each one leads with what you will actually see.
Symptomcan't find UUID
The placeholder went into fstab instead of the real UUID. Paste the value blkid printed and run mount -a again.
Symptomthe box stops in emergency mode on reboot
A line that can't mount holds up boot. That's why mount -a runs before any reboot: it fails the same way while you can still fix it.
Symptomfolders you made are gone after mounting
Folders created before the mount sit on the OS disk, hidden underneath it. Create the layout only after df -h /srv shows the data drive.
Verify
findmnt /srv # the data drive, ext4, noatime
df -h /srv # the data drive's size, not the OS disk's
ls -ld /srv/stacks # owned by youruser- 17 Oct 2026First written. Verified on Debian 13.6.