xref: /freebsd/tools/regression/zfs/zpool/create/raidz2.t (revision 1c05a6ea6b849ff95e539c31adea887c644a6a01)
1#!/bin/sh
2# $FreeBSD$
3
4dir=`dirname $0`
5. ${dir}/../../misc.sh
6
7echo "1..23"
8
9disks_create 12
10names_create 1
11
12expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0}
13expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1}
14
15expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2}
16expect_ok ${ZPOOL} status -x ${name0}
17expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
18exp=`(
19  echo "  pool: ${name0}"
20  echo " state: ONLINE"
21  echo " scrub: none requested"
22  echo "config:"
23  echo "	NAME          STATE   READ WRITE CKSUM"
24  echo "	${name0}      ONLINE     0     0     0"
25  echo "	  raidz2      ONLINE     0     0     0"
26  echo "	    ${disk0}  ONLINE     0     0     0"
27  echo "	    ${disk1}  ONLINE     0     0     0"
28  echo "	    ${disk2}  ONLINE     0     0     0"
29  echo "errors: No known data errors"
30)`
31expect "${exp}" ${ZPOOL} status ${name0}
32expect_ok ${ZPOOL} destroy ${name0}
33expect_fl ${ZPOOL} status -x ${name0}
34expect_fl ${ZPOOL} destroy ${name0}
35
36expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
37expect_ok ${ZPOOL} status -x ${name0}
38expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
39exp=`(
40  echo "  pool: ${name0}"
41  echo " state: ONLINE"
42  echo " scrub: none requested"
43  echo "config:"
44  echo "	NAME          STATE   READ WRITE CKSUM"
45  echo "	${name0}      ONLINE     0     0     0"
46  echo "	  raidz2      ONLINE     0     0     0"
47  echo "	    ${disk0}  ONLINE     0     0     0"
48  echo "	    ${disk1}  ONLINE     0     0     0"
49  echo "	    ${disk2}  ONLINE     0     0     0"
50  echo "	    ${disk3}  ONLINE     0     0     0"
51  echo "	    ${disk4}  ONLINE     0     0     0"
52  echo "errors: No known data errors"
53)`
54expect "${exp}" ${ZPOOL} status ${name0}
55expect_ok ${ZPOOL} destroy ${name0}
56expect_fl ${ZPOOL} status -x ${name0}
57expect_fl ${ZPOOL} destroy ${name0}
58
59expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} raidz2 ${disk8} ${disk9} ${disk10} ${disk11}
60expect_ok ${ZPOOL} status -x ${name0}
61expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
62exp=`(
63  echo "  pool: ${name0}"
64  echo " state: ONLINE"
65  echo " scrub: none requested"
66  echo "config:"
67  echo "	NAME           STATE   READ WRITE CKSUM"
68  echo "	${name0}       ONLINE     0     0     0"
69  echo "	  raidz2       ONLINE     0     0     0"
70  echo "	    ${disk0}   ONLINE     0     0     0"
71  echo "	    ${disk1}   ONLINE     0     0     0"
72  echo "	    ${disk2}   ONLINE     0     0     0"
73  echo "	    ${disk3}   ONLINE     0     0     0"
74  echo "	  raidz2       ONLINE     0     0     0"
75  echo "	    ${disk4}   ONLINE     0     0     0"
76  echo "	    ${disk5}   ONLINE     0     0     0"
77  echo "	    ${disk6}   ONLINE     0     0     0"
78  echo "	    ${disk7}   ONLINE     0     0     0"
79  echo "	  raidz2       ONLINE     0     0     0"
80  echo "	    ${disk8}   ONLINE     0     0     0"
81  echo "	    ${disk9}   ONLINE     0     0     0"
82  echo "	    ${disk10}  ONLINE     0     0     0"
83  echo "	    ${disk11}  ONLINE     0     0     0"
84  echo "errors: No known data errors"
85)`
86expect "${exp}" ${ZPOOL} status ${name0}
87expect_ok ${ZPOOL} destroy ${name0}
88expect_fl ${ZPOOL} status -x ${name0}
89expect_fl ${ZPOOL} destroy ${name0}
90
91disks_destroy
92