zpool_create_005_pos.ksh revision 8b713775314bbbf24edd503b4869342d8711ce95
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Copyright (c) 2012 by Delphix. All rights reserved.
#
#
# DESCRIPTION:
# 'zpool create [-R root][-m mountpoint] <pool> <vdev> ...' can create an
# alternate root pool or a new pool mounted at the specified mountpoint.
#
# STRATEGY:
# 1. Create a pool with '-m' option
# 2. Verify the pool is mounted at the specified mountpoint
#
verify_runnable "global"
function cleanup
{
poolexists $TESTPOOL && \
done
}
log_assert "'zpool create [-R root][-m mountpoint] <pool> <vdev> ...' can create" \
"an alternate pool or a new pool mounted at the specified mountpoint."
set -A pooltype "" "mirror" "raidz" "raidz1" "raidz2"
#
# cleanup the pools created in previous case if zpool_create_004_pos timedout
#
if poolexists $pool; then
fi
done
#prepare raw file for file disk
typeset -i i=1
while (( i < 4 )); do
(( i = i + 1 ))
done
#Remove the directory with name as pool name if it exists
do
i=0
while (( i < ${#pooltype[*]} )); do
#Remove the testing pool and its mount directory
poolexists $TESTPOOL && \
! poolexists $TESTPOOL && \
(( ${#mpt} == 0 )) && \
log_fail "The value of mountpoint property is different\
from the output of zfs mount"
[[ ! -d $TESTDIR1 ]] && \
else
fi
[[ -d /$TESTPOOL ]] && \
"while with $opt option."
(( i = i + 1 ))
done
done
log_pass "'zpool create [-R root][-m mountpoint] <pool> <vdev> ...' works as expected."