1*215198a6SJoe Stein#!/bin/ksh
2*215198a6SJoe Stein
3*215198a6SJoe Stein#
4*215198a6SJoe Stein# This file and its contents are supplied under the terms of the
5*215198a6SJoe Stein# Common Development and Distribution License ("CDDL"), version 1.0.
6*215198a6SJoe Stein# You may only use this file in accordance with the terms of version
7*215198a6SJoe Stein# 1.0 of the CDDL.
8*215198a6SJoe Stein#
9*215198a6SJoe Stein# A full copy of the text of the CDDL should have accompanied this
10*215198a6SJoe Stein# source.  A copy of the CDDL is also available via the Internet at
11*215198a6SJoe Stein# http://www.illumos.org/license/CDDL.
12*215198a6SJoe Stein#
13*215198a6SJoe Stein
14*215198a6SJoe Stein#
15*215198a6SJoe Stein# Copyright (c) 2015 by Delphix. All rights reserved.
16*215198a6SJoe Stein#
17*215198a6SJoe Stein
18*215198a6SJoe Stein#
19*215198a6SJoe Stein# Description:
20*215198a6SJoe Stein# Verify that per-vdev ZAPs are created with one vdev.
21*215198a6SJoe Stein#
22*215198a6SJoe Stein# Strategy:
23*215198a6SJoe Stein# 1. Create a pool with one disk.
24*215198a6SJoe Stein# 2. Verify that the disk has a top and leaf ZAP in its config and the MOS.
25*215198a6SJoe Stein#
26*215198a6SJoe Stein
27*215198a6SJoe Stein. $STF_SUITE/include/libtest.shlib
28*215198a6SJoe Stein. $STF_SUITE/tests/functional/vdev_zaps/vdev_zaps.kshlib
29*215198a6SJoe Stein
30*215198a6SJoe Steinlog_assert "Per-vdev ZAPs are created on pool creation with one disk."
31*215198a6SJoe Stein
32*215198a6SJoe SteinDISK=${DISKS%% *}
33*215198a6SJoe Stein
34*215198a6SJoe Steinlog_must zpool create -f $TESTPOOL $DISK
35*215198a6SJoe Steinconf="$TESTDIR/vz001"
36*215198a6SJoe Steinlog_must zdb -PC $TESTPOOL > $conf
37*215198a6SJoe Stein
38*215198a6SJoe Steinassert_top_zap $TESTPOOL $DISK "$conf"
39*215198a6SJoe Steinassert_leaf_zap $TESTPOOL $DISK "$conf"
40*215198a6SJoe Steinassert_has_sentinel "$conf"
41*215198a6SJoe Stein
42*215198a6SJoe Steinlog_pass "Per-vdev ZAPs are created in a one-disk pool."
43