vdev incorrectly expanding when last mirror child promoted to top-level vdev
With ZFS, if the smaller of 2 different sized child vdev's of a mirrored vdev is detached, and the pool has the autoexpand=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 was identified on zfsonlinux and found to be present on Illumos ( looks to effect all OpenZFS implementations ).
Details and test case against different platforms can be found here:
Have created a fix which has been reviewed by George Wilson, working on a testrunner script to test for the issue so will email both out for review shortly.