log_must zpool export $NESTEDPOOL
log_must zpool import -d $FILEDISKDIR --rewind-to-checkpoint $NESTEDPOOL
-log_must zdb $NESTEDPOOL
+log_must zpool export $NESTEDPOOL
+log_must zdb -e -p $FILEDISKDIR $NESTEDPOOL
log_pass "Rewind to checkpoint on a stressed pool."
#
log_must zpool list $NESTEDPOOL
-log_must zdb -kc $NESTEDPOOL
-
log_must zpool export $NESTEDPOOL
+log_must zdb -e -p $FILEDISKDIR -kc $NESTEDPOOL
+
log_must zpool import -d $FILEDISKDIR --rewind-to-checkpoint $NESTEDPOOL
log_must [ "$(head -c 100 $NESTEDFS0FILE)" = "$FILE0INTRO" ]
-log_must zdb $NESTEDPOOL
+log_must zpool export $NESTEDPOOL
+log_must zdb -e -p $FILEDISKDIR $NESTEDPOOL
log_pass "Do not reuse checkpointed space at low capacity."
nested_wait_discard_finish
-log_must zdb $NESTEDPOOL
+log_must zpool export $NESTEDPOOL
+log_must zdb -e -p $FILEDISKDIR $NESTEDPOOL
log_pass "Can export/import but not rewind/checkpoint/discard or " \
"change pool's config while discarding."
function cleanup_nested_pool
{
- log_must zpool destroy $NESTEDPOOL
+ if poolexists $NESTEDPOOL; then
+ log_must zpool destroy $NESTEDPOOL
+ fi
+
log_must rm -f $FILEDISKS
}
function cleanup_test_pool
{
- log_must zpool destroy $TESTPOOL
+ if poolexists $TESTPOOL; then
+ log_must zpool destroy $TESTPOOL
+ fi
#
# We always clear the labels of all disks