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 16 2024, 9:17 PM
Parents
rG1f5bf9600146: Make zdb -R a little more sane.
Branches
Unknown
Tags
Unknown