HomeFreeBSD

Preserve asize when last mirror child promoted to top-level vdev

Description

Preserve asize when last mirror child promoted to top-level vdev

If the smaller of 2 different sized child vdev's of a mirrored vdev is
detached, and the pool has the autoexpand property set to off, as the
remaining larger vdev is promoted to a top level vdev it fails to retain
the asize of the original top level mirror vdev and therefore partially
autoexpands.

This partially autoexpanded state leaves the new vdev too large to
re-mirror by adding the smaller vdev back in, and the pool fails to
utilize the space until next imported.

If the autoexpand property is set to on, the child vdev grows
in size after it has been promoted to a top level vdev as expected.

This commit causes the remaining child mirror to retain the asize of its
old parent mirror vdev if the autoexpand property is set to off,
this allows the smaller vdev to be re-added if required the vdev
can then be told to expand if required by the usual using zpool online -e.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Andrew Barnes <barnes333@gmail.com>
Signed-off-by: George Wilson <george.wilson@delphix.com>
Closes #1208

Details

Provenance
Andrew Barnes <barnes333@gmail.com>Authored on Jun 10 2014, 6:29 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 2 2014, 9:04 PM
Parents
rGb8fce77b08d1: Fix comment spelling errors.
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG61e99a73bc34: Preserve asize when last mirror child promoted to top-level vdev (authored by Andrew Barnes <barnes333@gmail.com>).Jul 2 2014, 9:04 PM