]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/regression/zfs/zpool/create/raidz2.t
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / regression / zfs / zpool / create / raidz2.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..23"
8
9 disks_create 12
10 names_create 1
11
12 expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0}
13 expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1}
14
15 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2}
16 expect_ok ${ZPOOL} status -x ${name0}
17 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
18 exp=`(
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 )`
31 expect "${exp}" ${ZPOOL} status ${name0}
32 expect_ok ${ZPOOL} destroy ${name0}
33 expect_fl ${ZPOOL} status -x ${name0}
34 expect_fl ${ZPOOL} destroy ${name0}
35
36 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
37 expect_ok ${ZPOOL} status -x ${name0}
38 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
39 exp=`(
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 )`
54 expect "${exp}" ${ZPOOL} status ${name0}
55 expect_ok ${ZPOOL} destroy ${name0}
56 expect_fl ${ZPOOL} status -x ${name0}
57 expect_fl ${ZPOOL} destroy ${name0}
58
59 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} raidz2 ${disk8} ${disk9} ${disk10} ${disk11}
60 expect_ok ${ZPOOL} status -x ${name0}
61 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
62 exp=`(
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 )`
86 expect "${exp}" ${ZPOOL} status ${name0}
87 expect_ok ${ZPOOL} destroy ${name0}
88 expect_fl ${ZPOOL} status -x ${name0}
89 expect_fl ${ZPOOL} destroy ${name0}
90
91 disks_destroy