rendered paste body# for file in 1 2 3 4
> do
> mkfile 64m file${file}
> done
# zpool create test raidz /tmp/file1 /tmp/file2 /tmp/file3 spare /tmp/file4
# for i in 5 6 7 8
> do
> mkfile 64m file${i}
> done
# zpool create test2 raidz /tmp/file5 /tmp/file6 /tmp/file7
# zpool status -v test test2
pool: test
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
/tmp/file3 ONLINE 0 0 0
spares
/tmp/file4 AVAIL
errors: No known data errors
pool: test2
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
test2 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file5 ONLINE 0 0 0
/tmp/file6 ONLINE 0 0 0
/tmp/file7 ONLINE 0 0 0
errors: No known data errors
# zpool replace test /tmp/file2 /tmp/file4
# zpool status -v
pool: test
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Thu Feb 14 10:40:17 2008
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
spare ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
/tmp/file4 ONLINE 0 0 0
/tmp/file3 ONLINE 0 0 0
spares
/tmp/file4 INUSE currently in use
errors: No known data errors
pool: test2
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
test2 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file5 ONLINE 0 0 0
/tmp/file6 ONLINE 0 0 0
/tmp/file7 ONLINE 0 0 0
errors: No known data errors
# zpool detach test /tmp/file2
# zpool status -v test
pool: test
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Thu Feb 14 10:40:17 2008
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
/tmp/file4 ONLINE 0 0 0
/tmp/file3 ONLINE 0 0 0
errors: No known data errors
# zpool replace test /tmp/file4 /tmp/file2
# zpool status -v
pool: extra
state: ONLINE
scrub: none requested
config:
pool: test
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Thu Feb 14 10:43:12 2008
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
replacing ONLINE 0 0 0
/tmp/file4 ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
/tmp/file3 ONLINE 0 0 0
errors: No known data errors
pool: test2
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
test2 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file5 ONLINE 0 0 0
/tmp/file6 ONLINE 0 0 0
/tmp/file7 ONLINE 0 0 0
errors: No known data errors
# zpool status -v
pool: test
state: ONLINE
scrub: resilver completed after 0h0m with 0 errors on Thu Feb 14 10:43:12 2008
config:
NAME STATE READ WRITE CKSUM
test ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
/tmp/file3 ONLINE 0 0 0
errors: No known data errors
pool: test2
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
test2 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/tmp/file5 ONLINE 0 0 0
/tmp/file6 ONLINE 0 0 0
/tmp/file7 ONLINE 0 0 0
errors: No known data errors