I need to replace disk for a zfs root installed system.
Previously it was (before reinstalling OS for test purpose which is also I want to accomplish after install):
Created mirror with zpool attach rpool /dev/sda2 /dev/sdb
NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 sda2 ONLINE 0 0 0 sdb ONLINE 0 0 0
And I reinstalled OS:
NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 sda2 ONLINE 0 0 0
sdb holds data...
pool: rpool-12312656247996879599 id: 12312656247996879599 state: DEGRADED status: One or more devices contains corrupted data. action: The pool can be imported despite missing or damaged devices. The fault tolerance of the pool may be compromised if imported. see: http://zfsonlinux.org/msg/ZFS-8000-4J config: rpool-12312656247996879599 DEGRADED mirror-0 DEGRADED sda2 FAULTED corrupted data sdb ONLINE
And I want to create mirror and sync data from sdb to current mirror after reinstalling OS. After reinstalling OS, I have one rpool and one sdb pool seperatly. I can send/recv data on two pools and destory sdb pool and attach to rpool and make mirror. But wondering is there any way without manually syncing files (send/recv) and attach sdb which is in pool to rpool without destroying it?