xref: /freebsd/tools/regression/zfs/zpool/add/raidz2.t (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1#!/bin/sh
2
3dir=`dirname $0`
4. ${dir}/../../misc.sh
5
6echo "1..10"
7
8disks_create 20
9names_create 1
10
11expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3}
12expect_ok ${ZPOOL} add ${name0} raidz2 ${disk4} ${disk5} ${disk6} ${disk7}
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 "	  raidz2      ONLINE     0     0     0"
21  echo "	    ${disk0}  ONLINE     0     0     0"
22  echo "	    ${disk1}  ONLINE     0     0     0"
23  echo "	    ${disk2}  ONLINE     0     0     0"
24  echo "	    ${disk3}  ONLINE     0     0     0"
25  echo "	  raidz2      ONLINE     0     0     0"
26  echo "	    ${disk4}  ONLINE     0     0     0"
27  echo "	    ${disk5}  ONLINE     0     0     0"
28  echo "	    ${disk6}  ONLINE     0     0     0"
29  echo "	    ${disk7}  ONLINE     0     0     0"
30  echo "errors: No known data errors"
31)`
32expect "${exp}" ${ZPOOL} status ${name0}
33expect_ok ${ZPOOL} destroy ${name0}
34expect_fl ${ZPOOL} status -x ${name0}
35
36expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6} ${disk7}
37expect_ok ${ZPOOL} add ${name0} raidz2 ${disk8} ${disk9} ${disk10} ${disk11} raidz2 ${disk12} ${disk13} ${disk14} ${disk15} raidz2 ${disk16} ${disk17} ${disk18} ${disk19}
38exp=`(
39  echo "  pool: ${name0}"
40  echo " state: ONLINE"
41  echo " scrub: none requested"
42  echo "config:"
43  echo "	NAME           STATE   READ WRITE CKSUM"
44  echo "	${name0}       ONLINE     0     0     0"
45  echo "	  raidz2       ONLINE     0     0     0"
46  echo "	    ${disk0}   ONLINE     0     0     0"
47  echo "	    ${disk1}   ONLINE     0     0     0"
48  echo "	    ${disk2}   ONLINE     0     0     0"
49  echo "	    ${disk3}   ONLINE     0     0     0"
50  echo "	  raidz2       ONLINE     0     0     0"
51  echo "	    ${disk4}   ONLINE     0     0     0"
52  echo "	    ${disk5}   ONLINE     0     0     0"
53  echo "	    ${disk6}   ONLINE     0     0     0"
54  echo "	    ${disk7}   ONLINE     0     0     0"
55  echo "	  raidz2       ONLINE     0     0     0"
56  echo "	    ${disk8}   ONLINE     0     0     0"
57  echo "	    ${disk9}   ONLINE     0     0     0"
58  echo "	    ${disk10}  ONLINE     0     0     0"
59  echo "	    ${disk11}  ONLINE     0     0     0"
60  echo "	  raidz2       ONLINE     0     0     0"
61  echo "	    ${disk12}  ONLINE     0     0     0"
62  echo "	    ${disk13}  ONLINE     0     0     0"
63  echo "	    ${disk14}  ONLINE     0     0     0"
64  echo "	    ${disk15}  ONLINE     0     0     0"
65  echo "	  raidz2       ONLINE     0     0     0"
66  echo "	    ${disk16}  ONLINE     0     0     0"
67  echo "	    ${disk17}  ONLINE     0     0     0"
68  echo "	    ${disk18}  ONLINE     0     0     0"
69  echo "	    ${disk19}  ONLINE     0     0     0"
70  echo "errors: No known data errors"
71)`
72expect "${exp}" ${ZPOOL} status ${name0}
73expect_ok ${ZPOOL} destroy ${name0}
74expect_fl ${ZPOOL} status -x ${name0}
75
76disks_destroy
77