Free weekly email: the week's new posts, videos and one tip from the books, every Sunday. Get it free →
Homelab the Right Way

Home › Posts

One Disk for Everything Is One Bad Day Away

Separate your system and data onto two physical drives to prevent a single hardware failure from destroying your server and photos simultaneously.

· 5 min read · homelabproxmoximmichhardwarebackupstorage

One Disk for Everything Is One Bad Day Away

Most new homelabbers size their first server by the apps they want to run today. That is the trap. A single SSD holding Proxmox, every container, and your entire photo library looks simple on day one, and nothing about it looks wrong until that drive wears out or fills up. Then you lose the server and the data at the same moment, and the restore needs the very disk that died.

The book Self-Host Your Life opens its hardware chapter with exactly this warning under a heading that sums it up: the trap: one disk, one container, one bad day. This post covers the layout rule, how to separate system from data, and the exact VM configuration that keeps your photos safe when the OS disk fails.

One caveat, straight from the book: this guidance assumes you are building a foundation with Proxmox on a used business mini PC or similar hardware. If you already run services in LXC containers, the advice differs slightly, but the core principle of separating system and data remains critical for anyone starting out.

The rule: two physical drives, not one partition

The most common beginner layout is a single SSD holding Proxmox, the containers, and every photo you own. It works until that SSD wears out or the filesystem fills up. Then you lose the server and the data at the same moment. The fix is to use two physical drives with distinct roles:

  • Drive 1, a small SSD (256 to 512 GB): Proxmox itself and the virtual disks of your guests. Databases live here because they need fast, local storage.
  • Drive 2, a large HDD or SSD: your photo library, Nextcloud files, and backups that are waiting to go elsewhere. This is the drive that grows.

The second trap is subtler but equally dangerous. Immich’s own documentation says it runs well in a full virtual machine and that Docker inside an LXC container is not recommended, possible only for advanced users. While some run Immich in an LXC and it works, others spend evenings untangling permissions problems that a VM would never have had. If this is your first build, follow the recommendation to use a VM.

One VM with Docker is easier to back up, update, and reason about than three hand-built containers, and it is exactly what the Immich and Nextcloud projects test against. The recommended VM size requires at least 4 vCPUs and 8 GB of RAM, though 12 to 16 GB is comfortable if you run multiple apps.

The trap: ignoring CPU instruction sets

Immich alone asks for 6 GB of RAM minimum and 8 GB recommended, but the hardware requirement that catches people out is the CPU. Its machine-learning container needs a CPU with the x86-64-v2 instruction level. Anything from about 2012 onward has it, but in Proxmox you must set the VM’s CPU type to host or x86-64-v2-AES. The default on recent Proxmox installations is often correct, but if you select an older generic model, the container will fail to start.

This setting matters because modern consumer CPUs include features required for efficient image processing. If you do not set the CPU type correctly, you may spend time debugging why Immich refuses to launch, when the issue is simply a mismatch between the virtual hardware definition and the physical chip’s capabilities.

The fix: create the VM from the shell

To implement the two-drive strategy, you must create a Debian 13 virtual machine that explicitly attaches both drives. Download the Debian 13 netinst ISO to your Proxmox ISO storage, then create the VM from the Proxmox shell. Adjust storage names to your own configuration; for example, use local-lvm for the SSD and tank for the big drive.

The command below sets up a VM named docker01 with 12 GB of RAM, 4 cores, and the correct CPU type. It attaches the system disk to the SSD storage and the data disk to the large drive storage. The --onboot 1 flag ensures the VM starts automatically if Proxmox reboots.

qm create 201 --name docker01 --memory 12288 --cores 4 \
  --cpu host --machine q35 --bios ovmf \
  --efidisk0 local-lvm:1,efitype=4m \
  --scsihw virtio-scsi-single \
  --scsi0 local-lvm:100,ssd=1,discard=on,iothread=1 \
  --scsi1 tank:1000,iothread=1 \
  --net0 virtio,bridge=vmbr0 --agent enabled=1 \
  --ide2 local:iso/debian-13-amd64-netinst.iso,media=cdrom \
  --boot order='scsi0;ide2' --onboot 1
qm start 201

Install Debian with no desktop environment and only "SSH server" and "standard system utilities" ticked. After the first boot, install the guest agent and Docker from Docker’s own repository. The distro’s docker.io package is older, and Immich’s documentation warns against it.

apt update && apt install -y qemu-guest-agent curl
systemctl enable --now qemu-guest-agent
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
docker compose version

Read get-docker.sh before you run it; it is a short script, and it is good practice never to pipe an unread script into a root shell. If you prefer, Docker’s documentation lists the manual apt repository steps for Debian.

The trap: relying on drive order instead of labels

Inside the VM, the second disk shows up as /dev/sdb. Formatting it once and mounting it by its label ensures that a reordered disk never mounts in the wrong place. If you mount by device name alone, a reboot might swap the identifiers, causing your system to boot without data or mount the OS drive into your photo folder.

The nofail option matters significantly here. If the data disk ever goes missing, the VM still boots and you can fix it over SSH instead of from a rescue console. Without nofail, a missing data disk could prevent the entire system from booting, leaving you locked out until you physically access the machine.

Format the data disk once and mount it by its label using these commands:

mkfs.ext4 -L data /dev/sdb
mkdir -p /srv/data
echo "LABEL=data /srv/data ext4 defaults,nofail 0 2" >> /etc/fstab
mount -a && df -h /srv/data
mkdir -p /srv/data/{immich,nextcloud,backups}

If you insist on LXC containers instead of a VM, set two features on the container and keep it unprivileged. However, put the database on container-local storage, not on a bind-mounted share, and expect to solve the odd permissions puzzle. It is a perfectly good setup once it is stable, but it is a poor place to learn.

pct set 143 --features nesting=1,keyctl=1
pct reboot 143

Checklist: foundation

☐ System and guest disks on an SSD; photos and files on a separate data drive ☐ One Debian 13 VM as the Docker host, CPU type host or x86-64-v2-AES ☐ At least 8 GB of RAM for the VM (12 GB or more if you run all three apps) ☐ Docker installed from Docker's repository; docker compose version works ☐ Data disk mounted by label with nofail, and df -h shows it ☐ The VM starts at boot (--onboot 1) and the guest agent is running

More articles