Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2018 16:25:35 +0200
From:      Gareth de Vaux <bsd@lordcow.org>
To:        freebsd-questions@freebsd.org
Subject:   Replacing failed drives on a raidz2 with geli
Message-ID:  <20180807142535.GA20017@lordcow.org>

next in thread | raw e-mail | index | archive | help
Hi all, I've installed a Root on ZFS raidz2 with geli encryption on FreeBSD
11.2 from the installer. I'm new to geli so trying to simulate a disk failure
to make sure I can recover. Once I've replaced 3 drives the zpool seems fine
but fails to reboot: http://lordcow.org/boot.jpg , specifically:

ZFS: i/o error - all block copies unavailable

I'm also asked to enter the passphrase for the new disks separately on boot
up prior to the 3rd one failing. I'm guessing the bootcode isn't getting copied
correctly but not sure where I'm going wrong, this's what I do after failing
and zero'ing a drive:

gpart create -s gpt ada0
gpart add -b 40 -s 512K -t freebsd-boot -l gptboot0 ada0
gpart add -b 2048 -s 2G -t freebsd-swap -l swap0 ada0
gpart add -s 15623856128 -t freebsd-zfs -l zfs0 ada0

(to match the tables of the other disks)

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
geli init -e AES-XTS -l 256 -s 4096 -b /dev/ada0p3

(Assuming these are the right parameters given what the installer does?
Not using a key, just a passphrase. Should master keys on the existing
array be backed up? how?)

geli attach /dev/ada0p3
zpool replace zroot ada0p3.eli

This succesfully resilvers the drive, but again on the 3rd drive it
fails to boot. Any help appreciated.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180807142535.GA20017>