ZFS | replace failed disk in mirrored root zfs

# da0 has failed
# da1 is running
# zroot is the pool
# da0p3 is the name of the mirror member you got via zfs status zroot

# clear the errors
zpool clear zroot

# REPLACE THE DISK da0 with a new one
# NOW:
# da0 is the virgin
# da1 is already existing and running chad

# create the zfs disk
gpart create -s GPT da0

# format the disk and randomize the guid
# sgdisk --replicate=/dev/VIRGIN /dev/CHAD
sgdisk --replicate=/dev/da0 /dev/da1
sgdisk --randomize-guids /dev/da0

zpool replace zroot /dev/da0p3

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.