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