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