Project

General

Profile

Bug #8617 ยป zpool-scrub-reproducer.sh

Simon K, 2017-09-06 02:13 PM

 
1
#!/bin/bash
2

    
3
POOL=pol.s
4

    
5
echo zpool status $POOL \| egrep 'scrub|scan|resilver'
6
zpool status $POOL | egrep 'scrub|scan|resilver'
7

    
8
echo zpool scrub $POOL
9
zpool scrub $POOL
10

    
11
sleep 5
12

    
13
echo zpool status $POOL \| egrep 'scrub|scan|resilver'
14
zpool status $POOL | egrep 'scrub|scan|resilver'
15

    
16
echo zpool replace $POOL c3t5000C5001A4DCB6Ed0
17
zpool offline $POOL c3t5000C5001A4DCB6Ed0
18

    
19
echo zpool status $POOL \| egrep 'scrub|scan|resilver'
20
zpool status $POOL | egrep 'scrub|scan|resilver'
21

    
22
echo zpool online $POOL c3t5000C5001A4DCB6Ed0
23
zpool online $POOL c3t5000C5001A4DCB6Ed0
24

    
25
echo zpool status $POOL \| egrep 'scrub|scan|resilver'
26
zpool status $POOL | egrep 'scrub|scan|resilver'
    (1-1/1)