HomeFreeBSD

fix: Uber block label not always found for aux vdevs

Description

fix: Uber block label not always found for aux vdevs

When spare or l2cache (aux) vdev is added during pool creation,
spa->spa_uberblock is not dumped until that point. Subsequently,
the aux label is never synchronized after its initial creation,
resulting in the uberblock label remaining undumped. The uberblock
is crucial for lib_blkid in identifying the ZFS partition type. To
address this issue, we now ensure sync of the uberblock label once
if it's not dumped initially.

Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15737

Details

Provenance
Ameer Hamza <ahamza@ixsystems.com>Authored on Jan 4 2024, 2:02 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 29 2024, 10:53 PM
Parents
rG2006ac1f4a52: Fix "out of memory" error
Branches
Unknown
Tags
Unknown