]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/zfs/zpool/create/option-o.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / zfs / zpool / create / option-o.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..44"
8
9 disks_create 1
10 names_create 2
11
12 expect_fl ${ZPOOL} create -o size=96M ${name0} ${disk0}
13 expect_fl ${ZPOOL} destroy ${name0}
14
15 expect_fl ${ZPOOL} create -o used=0 ${name0} ${disk0}
16 expect_fl ${ZPOOL} destroy ${name0}
17
18 expect_fl ${ZPOOL} create -o available=96M ${name0} ${disk0}
19 expect_fl ${ZPOOL} destroy ${name0}
20
21 expect_fl ${ZPOOL} create -o capacity=0% ${name0} ${disk0}
22 expect_fl ${ZPOOL} destroy ${name0}
23
24 expect_fl is_mountpoint /${name0}
25 expect_fl is_mountpoint /${name1}
26 expect_ok ${ZPOOL} create -o altroot=/${name1} ${name0} ${disk0}
27 exp=`(
28   echo "NAME      PROPERTY  VALUE      SOURCE"
29   echo "${name0}  altroot   /${name1}  local"
30 )`
31 expect "${exp}" ${ZPOOL} get altroot ${name0}
32 expect_fl is_mountpoint /${name0}
33 if [ -z "${no_mountpoint}" ]; then
34         expect_ok is_mountpoint /${name1}
35 else
36         expect_fl is_mountpoint /${name1}
37 fi
38 expect_ok ${ZPOOL} destroy ${name0}
39 expect_fl is_mountpoint /${name0}
40 expect_fl is_mountpoint /${name1}
41
42 expect_fl ${ZPOOL} create -o health=ONLINE ${name0} ${disk0}
43 expect_fl ${ZPOOL} destroy ${name0}
44
45 expect_fl ${ZPOOL} create -o guid=13949667482126165574 ${name0} ${disk0}
46 expect_fl ${ZPOOL} destroy ${name0}
47
48 expect_ok ${ZPOOL} create -o version=9 ${name0} ${disk0}
49 exp=`(
50   echo "NAME      PROPERTY  VALUE  SOURCE"
51   echo "${name0}  version   9      local"
52 )`
53 expect "${exp}" ${ZPOOL} get version ${name0}
54 expect_ok ${ZPOOL} destroy ${name0}
55
56 expect_fl ${ZPOOL} create -o bootfs=${name0}/root ${name0} ${disk0}
57 expect_fl ${ZPOOL} destroy ${name0}
58
59 expect_ok ${ZPOOL} create -o delegation=off ${name0} ${disk0}
60 exp=`(
61   echo "NAME      PROPERTY    VALUE  SOURCE"
62   echo "${name0}  delegation  off    local"
63 )`
64 expect "${exp}" ${ZPOOL} get delegation ${name0}
65 expect_ok ${ZPOOL} destroy ${name0}
66
67 expect_ok ${ZPOOL} create -o autoreplace=on ${name0} ${disk0}
68 exp=`(
69   echo "NAME      PROPERTY     VALUE  SOURCE"
70   echo "${name0}  autoreplace  on     local"
71 )`
72 expect "${exp}" ${ZPOOL} get autoreplace ${name0}
73 expect_ok ${ZPOOL} destroy ${name0}
74
75 expect_ok ${ZPOOL} create -o cachefile=none ${name0} ${disk0}
76 exp=`(
77   echo "NAME      PROPERTY   VALUE  SOURCE"
78   echo "${name0}  cachefile  none   local"
79 )`
80 expect "${exp}" ${ZPOOL} get cachefile ${name0}
81 expect_ok ${ZPOOL} destroy ${name0}
82
83 expect_ok ${ZPOOL} create -o cachefile=/tmp/${name1} ${name0} ${disk0}
84 exp=`(
85   echo "NAME      PROPERTY   VALUE          SOURCE"
86   echo "${name0}  cachefile  /tmp/${name1}  local"
87 )`
88 expect "${exp}" ${ZPOOL} get cachefile ${name0}
89 expect_ok ${ZPOOL} destroy ${name0}
90
91 expect_ok ${ZPOOL} create -o failmode=continue ${name0} ${disk0}
92 exp=`(
93   echo "NAME      PROPERTY  VALUE     SOURCE"
94   echo "${name0}  failmode  continue  local"
95 )`
96 expect "${exp}" ${ZPOOL} get failmode ${name0}
97 expect_ok ${ZPOOL} destroy ${name0}
98
99 expect_ok ${ZPOOL} create -o failmode=panic ${name0} ${disk0}
100 exp=`(
101   echo "NAME      PROPERTY  VALUE  SOURCE"
102   echo "${name0}  failmode  panic  local"
103 )`
104 expect "${exp}" ${ZPOOL} get failmode ${name0}
105 expect_ok ${ZPOOL} destroy ${name0}
106
107 disks_destroy