vdev_zaps_004_pos.ksh revision 215198a6ad15cf4832370e2f19247abeb36b951a
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
#
# Copyright (c) 2015 by Delphix. All rights reserved.
#
#
# Description:
#
# Strategy:
# 1. Create a pool with one disk. Verify that it has a top and leaf ZAP.
# 2. Attach a disk.
# 3. Verify that top-level and leaf-level ZAPs were transferred properly.
# 4. Verify that the newly-attached disk has a leaf ZAP.
# 5. Detach the original disk.
# 6. Verify that top-level and leaf-level ZAPs were transferred properly.
#
log_assert "Per-vdev ZAPs are transferred properly on attach/detach"
# Make the pool.
#
# Attach a disk.
#
# Ensure top-level ZAP was transferred successfully.
log_fail "Top-level ZAP wasn't transferred successfully on attach."
fi
# Ensure leaf ZAP of original disk was transferred successfully.
log_fail "$DISK used to have leaf-level ZAP $orig_leaf, now has "\
fi
# Ensure original disk no longer has top-level ZAP.
# Ensure attached disk got a leaf-level ZAP but not a top-level ZAP.
#
# Detach original disk.
#
# Make sure top ZAP was successfully transferred.
"promoting $disk2 (expected $orig_top, found $final_top)"
# Make sure leaf ZAP was successfully transferred.
"on promotion (expected $dsk2_leaf, got $final_leaf)"