Lines Matching refs:pool

71 # within the specified pool
73 # $1 The specified pool
78 typeset pool=$1
81 [[ -z $pool ]] && log_fail "No specified pool."
85 mntpnt=$(get_prop mountpoint $pool)
95 # Create test pool and fill with files and directories.
97 # $1 pool name
98 # $2 pool type
103 typeset pool=$1
118 if poolexists $pool ; then
119 destroy_pool $pool
124 log_must zpool create -m $TESTDIR $pool $keyword $vdevs
143 # Check pool status is healthy
145 # $1 pool
149 typeset pool=$1
151 typeset healthy_output="pool '$pool' is healthy"
152 typeset real_output=$(zpool status -x $pool)
158 zpool status -x $pool | grep "state:" | \
164 l_scan=$(zpool status -x $pool | grep "scan:")
173 # Check pool data is valid
175 # $1 pool
179 typeset pool=$1
181 record_data $pool $PST_RECORD_FILE
192 # $1 pool name
195 function get_vdevs #pool cnt
197 typeset pool=$1
200 typeset all_devs=$(zpool iostat -v $pool | awk '{print $1}'| \
201 egrep -v "^pool$|^capacity$|^mirror$|^raidz1$|^raidz2$|---" | \
202 egrep -v "/old$|^$pool$")
217 # Synchronize all the data in pool
219 # $1 pool name
221 function sync_pool #pool
223 typeset pool=$1
227 # Flush all the pool data.
229 zpool scrub $pool >/dev/null 2>&1
232 log_fail "zpool scrub $pool failed."
234 while ! is_pool_scrubbed $pool; do
235 if is_pool_resilvered $pool ; then
236 log_fail "$pool should not be resilver completed."
245 # $1 pool name
250 typeset pool=$1
256 log_must zpool replace -f $pool $vdev $vdev
258 if ! is_pool_resilvered $pool ; then
268 # Damage the pool's virtual device files.
270 # $1 pool name
277 typeset pool=$1
283 vdevs=$(get_vdevs $pool $cnt)
297 sync_pool $pool
301 # Clear errors in the pool caused by data corruptions
303 # $1 pool name
307 typeset pool=$1
309 log_must zpool clear $pool
311 if ! is_healthy $pool ; then
312 log_note "$pool should be healthy."
315 if ! is_data_valid $pool ; then
316 log_note "Data should be valid in $pool."
324 # Remove the specified pool's virtual device files
331 typeset pool=$1
335 vdevs=$(get_vdevs $pool $cnt)
338 sync_pool $pool
342 # Recover the bad or missing device files in the pool
349 typeset pool=$1
353 vdevs=$(get_vdevs $pool $cnt)
354 replace_missing_devs $pool $vdevs
356 if ! is_healthy $pool ; then
357 log_note "$pool should be healthy."
360 if ! is_data_valid $pool ; then
361 log_note "Data should be valid in $pool."