From 3f977bc0738fc392d4f33a0f1c3435e95bb63ac3 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 17 Mar 2019 20:38:48 -0500 Subject: [PATCH] Debian/Ubuntu: Split some mirror instructions --- Debian-Stretch-Root-on-ZFS.md | 5 +++-- Ubuntu-18.04-Root-on-ZFS.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Debian-Stretch-Root-on-ZFS.md b/Debian-Stretch-Root-on-ZFS.md index 5576b7d..a161dae 100644 --- a/Debian-Stretch-Root-on-ZFS.md +++ b/Debian-Stretch-Root-on-ZFS.md @@ -55,7 +55,7 @@ If you have a second system, using SSH to access the target system can be conven Clear the partition table: # sgdisk --zap-all /dev/disk/by-id/scsi-SATA_disk1 -2.2 Partition your disk: +2.2 Partition your disk(s): Run this if you need legacy (BIOS) booting: # sgdisk -a1 -n2:34:2047 -t2:EF02 /dev/disk/by-id/scsi-SATA_disk1 @@ -71,6 +71,7 @@ Always use the long `/dev/disk/by-id/*` aliases with ZFS. Using the `/dev/sd*` **Hints:** * `ls -la /dev/disk/by-id` will list the aliases. * Are you doing this in a virtual machine? If your virtual disk is missing from `/dev/disk/by-id`, use `/dev/vda` if you are using KVM with virtio; otherwise, read the [troubleshooting](#troubleshooting) section. +* If you are doing a mirror or raidz topology, repeat the partitioning commands for all the disks which will be part of the pool. 2.3 Create the root pool: @@ -90,7 +91,7 @@ Always use the long `/dev/disk/by-id/*` aliases with ZFS. Using the `/dev/sd*` * Make sure to include the `-part1` portion of the drive path. If you forget that, you are specifying the whole disk, which ZFS will then re-partition, and you will lose the bootloader partition(s). **Hints:** -* The root pool does not have to be a single disk; it can have a mirror or raidz topology. In that case, repeat the partitioning commands for all the disks which will be part of the pool. Then, create the pool using `zpool create ... rpool mirror /dev/disk/by-id/scsi-SATA_disk1-part1 /dev/disk/by-id/scsi-SATA_disk2-part1` (or replace `mirror` with `raidz`, `raidz2`, or `raidz3` and list the partitions from additional disks). Later, install GRUB to all the disks. This is trivial for MBR booting; the UEFI equivalent is currently left as an exercise for the reader. +* If you are doing a mirror or raidz topology, create the pool using `zpool create ... rpool mirror /dev/disk/by-id/scsi-SATA_disk1-part1 /dev/disk/by-id/scsi-SATA_disk2-part1` (or replace `mirror` with `raidz`, `raidz2`, or `raidz3` and list the partitions from additional disks). * The pool name is arbitrary. On systems that can automatically install to ZFS, the root pool is named `rpool` by default. If you work with multiple systems, it might be wise to use `hostname`, `hostname0`, or `hostname-1` instead. ## Step 3: System Installation diff --git a/Ubuntu-18.04-Root-on-ZFS.md b/Ubuntu-18.04-Root-on-ZFS.md index f93c951..947e5b0 100644 --- a/Ubuntu-18.04-Root-on-ZFS.md +++ b/Ubuntu-18.04-Root-on-ZFS.md @@ -59,7 +59,7 @@ If you have a second system, using SSH to access the target system can be conven Clear the partition table: # sgdisk --zap-all /dev/disk/by-id/scsi-SATA_disk1 -2.2 Partition your disk: +2.2 Partition your disk(s): Run this if you need legacy (BIOS) booting: # sgdisk -a1 -n2:34:2047 -t2:EF02 /dev/disk/by-id/scsi-SATA_disk1 @@ -83,6 +83,7 @@ Always use the long `/dev/disk/by-id/*` aliases with ZFS. Using the `/dev/sd*` **Hints:** * `ls -la /dev/disk/by-id` will list the aliases. * Are you doing this in a virtual machine? If your virtual disk is missing from `/dev/disk/by-id`, use `/dev/vda` if you are using KVM with virtio; otherwise, read the [troubleshooting](#troubleshooting) section. +* If you are doing a mirror or raidz topology, repeat the partitioning commands for all the disks which will be part of the pool. 2.3 Create the root pool: @@ -117,7 +118,7 @@ Choose one of the following options: * Your passphrase will likely be the weakest link. Choose wisely. See [section 5 of the cryptsetup FAQ](https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions#5-security-aspects) for guidance. **Hints:** -* The root pool does not have to be a single disk; it can have a mirror or raidz topology. In that case, repeat the partitioning commands for all the disks which will be part of the pool. Then, create the pool using `zpool create ... rpool mirror /dev/disk/by-id/scsi-SATA_disk1-part1 /dev/disk/by-id/scsi-SATA_disk2-part1` (or replace `mirror` with `raidz`, `raidz2`, or `raidz3` and list the partitions from additional disks). +* If you are doing a mirror or raidz topology, create the pool using `zpool create ... rpool mirror /dev/disk/by-id/scsi-SATA_disk1-part1 /dev/disk/by-id/scsi-SATA_disk2-part1` (or replace `mirror` with `raidz`, `raidz2`, or `raidz3` and list the partitions from additional disks). * The pool name is arbitrary. On systems that can automatically install to ZFS, the root pool is named `rpool` by default. If you work with multiple systems, it might be wise to use `hostname`, `hostname0`, or `hostname-1` instead. ## Step 3: System Installation