HomeFreeBSD

gmirror: Bump the syncid if broken disks are found during startup.

Description

gmirror: Bump the syncid if broken disks are found during startup.

Consider a mirror with two components, m1 and m2. Suppose a hardware error
results in the removal of m2, with m1's genid bumped. Suppose further that
a replacement mirror component m3 is created and synchronized, after which
the system is shut down uncleanly. During a subsequent bootup, if gmirror
tastes m1 and m2 first, m2 will be removed from the mirror because it is
broken, but the mirror will be started without bumping the syncid on m1
because all elements of the mirror are accounted for. Then m3 will be
added to the already-running mirror with the same syncid as m1, so the
components will not be synchronized despite the unclean shutdown.

Handle this scenario by bumping the syncid of healthy components if any
broken mirrors are discovered during mirror startup.

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

Details

Provenance
markjAuthored on
Parents
rS306742: gmirror: Use bool instead of boolean_t.
Branches
Unknown
Tags
Unknown