You don't want to mirror the bootcode, it's meant to be written on each disk separately. Swap on the other hand can be mirrored with gmirror(8).
Sorry, what I wrote was imprecise. I meant:
- By having GPT "bootcode" on ada0 AND ada1 (this is "duplicated" not mirrored) the machine can boot from either disk during a failure at bootime. What happens when there is an update in the bootcode? Is that part of freebsd-update? can it update the partitions on both disks?
- The swap is mirrored (I selected that as an option during bsdinstall), so we get data redundancy on swap… nice to have, might prevent a crash when heavily swapping sometime in the far future and then one of the 2 disks with the swap partition dies. Not sure how this actually works, looks like gmirror:
Code:
[oliver@zfsroot ~]$ gmirror list
Geom name: swap
State: COMPLETE
Components: 2
Balance: load
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 1798221310
Providers:
1. Name: mirror/swap
Mediasize: 2147483136 (2.0G)
Sectorsize: 512
Mode: r1w1e0
- What I did not decide to do, was to create ADDITIONAL copies of bootcode (duplicate) and swap (mirrored) and the 3rd and 4th disks (ada2 and ada3). This manual page seems to suggest that you might want to that. I didn't because I figured 2 copies was enough, and AKAIK zfs doesn't care that the second vdev (ada2, ada3) is slightly bigger than the ada0p3 & ada1p3 vdev. In fact that's kind of the point of zfs right? Well one of them.