xref: /freebsd/tools/regression/zfs/zpool/create/already_exists.t (revision d8a0fe102c0cfdfcd5b818f850eff09d8536c9bc)
1#!/bin/sh
2# $FreeBSD$
3
4dir=`dirname $0`
5. ${dir}/../../misc.sh
6
7echo "1..5"
8
9disks_create 2
10names_create 1
11
12expect_ok ${ZPOOL} create ${name0} ${disk0}
13exp=`(
14  echo "  pool: ${name0}"
15  echo " state: ONLINE"
16  echo " scrub: none requested"
17  echo "config:"
18  echo "	NAME        STATE   READ WRITE CKSUM"
19  echo "	${name0}    ONLINE     0     0     0"
20  echo "	  ${disk0}  ONLINE     0     0     0"
21  echo "errors: No known data errors"
22)`
23expect "${exp}" ${ZPOOL} status ${name0}
24expect_fl ${ZPOOL} create ${name0} ${disk1}
25expect "${exp}" ${ZPOOL} status ${name0}
26expect_ok ${ZPOOL} destroy ${name0}
27
28disks_destroy
29