xref: /freebsd/tools/regression/zfs/zpool/create/disks.t (revision 2e3f49888ec8851bafb22011533217487764fdb0)
1#!/bin/sh
2
3dir=`dirname $0`
4. ${dir}/../../misc.sh
5
6echo "1..14"
7
8disks_create 5
9names_create 1
10
11expect_ok ${ZPOOL} create ${name0} ${disk0}
12expect_ok ${ZPOOL} status -x ${name0}
13expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
14exp=`(
15  echo "  pool: ${name0}"
16  echo " state: ONLINE"
17  echo " scrub: none requested"
18  echo "config:"
19  echo "	NAME        STATE   READ WRITE CKSUM"
20  echo "	${name0}    ONLINE     0     0     0"
21  echo "	  ${disk0}  ONLINE     0     0     0"
22  echo "errors: No known data errors"
23)`
24expect "${exp}" ${ZPOOL} status ${name0}
25expect_ok ${ZPOOL} destroy ${name0}
26expect_fl ${ZPOOL} status -x ${name0}
27expect_fl ${ZPOOL} destroy ${name0}
28
29expect_ok ${ZPOOL} create ${name0} ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
30expect_ok ${ZPOOL} status -x ${name0}
31expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
32exp=`(
33  echo "  pool: ${name0}"
34  echo " state: ONLINE"
35  echo " scrub: none requested"
36  echo "config:"
37  echo "	NAME        STATE   READ WRITE CKSUM"
38  echo "	${name0}    ONLINE     0     0     0"
39  echo "	  ${disk0}  ONLINE     0     0     0"
40  echo "	  ${disk1}  ONLINE     0     0     0"
41  echo "	  ${disk2}  ONLINE     0     0     0"
42  echo "	  ${disk3}  ONLINE     0     0     0"
43  echo "	  ${disk4}  ONLINE     0     0     0"
44  echo "errors: No known data errors"
45)`
46expect "${exp}" ${ZPOOL} status ${name0}
47expect_ok ${ZPOOL} destroy ${name0}
48expect_fl ${ZPOOL} status -x ${name0}
49expect_fl ${ZPOOL} destroy ${name0}
50
51disks_destroy
52