Re: FreeBSD boot from root pool larger than 1Tb/cannot read MOS/all block copies unavailable

From: Warner Losh <imp_at_bsdimp.com>
Date: Wed, 27 Apr 2022 13:25:29 UTC
On Wed, Apr 27, 2022 at 7:05 AM Larry Rosenman <ler@lerctr.org> wrote:

> On 04/27/2022 7:45 am, Tomoaki AOKI wrote:
> [snip]
> > I've booting with around 1.5T or above (but under 2T) Root-on-ZFS
> > installation via UEFI for years.
> >
> > Basically, UEFI requires GPT partitioning. So many of those would boot
> > from larger than 1TB boot pool.
> >
> > As, IIRC, it is optional, some UEFI firmware would be able to boot from
> > MBR-patritioned disk but there would be some risk that they have the
> > same limitations as legacy BIOS in such situations.
> >
> > Note that possibly I'm just lucky enough not to be bitten.
>
> I've been booting UEFI from 10T pools for literally years, and I have a
> HP server
> with a 5T pool that IIRC boots GPT with BIOS, and a different Dell that
> has a 6T
> pool also GPT and UEFI.
>

Both bsdlabel and mbr have a 32-bit block count, which means for 512-byte
blocks, the largest they can describe is 2TB. That's likely the root cause
of this issue. The BIOS can't read beyond that limit on the disks. It's hit
or
miss what BIOSes do with 4k drives, though most of the later ones before
uefi was well established coped well enough.

This isn't to say that the old code in FreeBSD 12's boot loader didn't have
other issues with LBAs > 32-bits for ZFS. And for MBR ZFS booting the
update of the boot blocks is, at best, super weird. If you've not done that,
you'll continue to have the older boot loader, even if the latest just
works.
I've never encountered this problem, so I can't offer better words of
advice,
though. All my ZFS booting started after I transitioned to UEFI booting.

Warner