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