Skip to content

Instantly share code, notes, and snippets.

View philkunz's full-sized avatar

Philipp Kunz philkunz

View GitHub Profile
@benitogf
benitogf / mirror.sh
Last active February 5, 2025 21:45
ZFS mirror ubuntu boot drive
#!/bin/sh
# Assumptions and requirements
# - All drives will be formatted. These instructions are not suitable for dual-boot
# - No hardware or software RAID is to be used, these would keep ZFS from detecting disk errors and correcting them. In UEFI settings, set controller mode to AHCI, not RAID
# - These instructions are specific to UEFI systems and GPT. If you have an older BIOS/MBR system, please use https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2020.04%20Root%20on%20ZFS.html
# change the these disks variables to your disks paths (check with lsblk)
DISK1="/dev/nvme0n1"
DISK2="/dev/nvme1n1"