Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
root@zfsfun:~# zpool create tank sdb
root@zfsfun:~# zfs create tank/test
root@zfsfun:~# cd /tank/test/
root@zfsfun:/tank/test# for n in 1 2 3 4 5 6 7 8 9 ; do cp -a /boot $n & done
root@zfsfun:/tank/test# zpool status tank
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors
root@zfsfun:/tank/test# zpool add tank mirror sdc sdd
invalid vdev specification
use '-f' to override the following errors:
mismatched replication level: pool uses disk and new vdev is mirror
root@zfsfun:/tank/test# zpool add -f tank mirror sdc sdd
root@zfsfun:/tank/test# zpool remove tank sdb
root@zfsfun:/tank/test# zpool status tank
pool: tank
state: ONLINE
scan: resilvered 7.50K in 0 days 00:00:01 with 0 errors on Fri Jun 19 13:13:35 2020
remove: Evacuation of /dev/sdb1 in progress since Fri Jun 19 13:13:36 2020
1 copied out of 928M at 1/s, 0.00% done, (copy is slow, no estimated time)
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
sdb ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
root@zfsfun:/tank/test# zpool status tank
pool: tank
state: ONLINE
scan: resilvered 7.50K in 0 days 00:00:01 with 0 errors on Fri Jun 19 13:13:35 2020
remove: Removal of vdev 0 copied 928M in 0h0m, completed on Fri Jun 19 13:14:05 2020
1.95K memory used for removed device mappings
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
errors: No known data errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.