ZFS Configuring NVME to boot the system from ZFS mirror

Hi!

I have motherboard with 2 NVME Samsung 980 Pro 1tb installed. These NVMEs will be included in the zpool (ZFS mirror), which will include a dataset with the FreeBSD root system. The system will boot in UEFI mode.

What I don't like about this configuration is the presence of a partition table. I would prefer ZFS to be installed directly on NVME. However, booting from NVME in Legacy BIOS mode (with the zfsboot bootloader) is not possible. So I still have to use a partition table.

What ways do I see:

1 - just install the system using the standard installer with the root on ZFS mirror setting.

Benefits: Standard repeatable ZFS setup, installer will do it right (probably).

Disadvantages: Partitions will be created. Should NVME need to be replaced in the event of a disaster, this will require a bit more work than simply replacing a failed drive in the zpool. For example, I will have to create partitions again, but now manually. And this is the main disadvantage.

2 - configure the partitions required to boot into UEFI mode on an external USB drive (or SATA SSD). Take some good Samsung drive for this.

Advantages: ZFS will be installed directly on NVME, there will be no partitions. Replacing disks in case of failure is greatly facilitated.

Disadvantages: it is not entirely clear how to set up a special disk for such a boot and how to tell it from which zpool the system should boot.

Question regarding option 2: what partitions should still be placed on a separate USB boot disk (or SATA SSD)? Have you come across examples of setting up such a configuration? Maybe you see some other way to install root on ZFS directly on NVME?

Thanks!
 
Concerning point 1, have you ever heard of this?
gpart backup nvme0 | gpart restore -F nvme1

See gpart(8)

Each disk in a mirror has to provide the booting, so better is to create corresponding partition(s) (EFI and/or legacy BIOS) and populate them with appropriate files.
 
  • Thanks
Reactions: dnb
Even booting UEFI you are going to need a partition to hold that filesystem, the rest can be dedicated to the zpool
 
  • Thanks
Reactions: dnb
Back
Top