ZFS: Cannot replace a replacing device…
I think some of you already have got that message. The problem is:
1) You have a degraded ZFS pool (some replica was gone)
2) You did try to fix that, changing the disk, and executing a “zpool replace poolname cxtxdx”
3) For some reason, the resilver process do not ends. So, you need:
a. Restart the resilver process (that kind of computer problems, uncertain and unknown);
b. Change the new drive (it’s bad too, you need to keep the bad ones on one side, and the good ones in the another side ;-), and restart the resilver process;
c. Restart the server (yes, this still fix somethings), and hope the pool is clean after that.
And if no option above helps you… ok, you have a big problem. If you have a lot of IO’s, so… you are a “walker problem”. ;-)
If you look for the solution, you will see this bug report. Not encouraging…
But there is hope… always! Here is a workaround that i have used, and maybe can help you too:
1) Forget about the old resilver process.
2) Instead of try to replace the disk with a new one, “attach” the new disk to the pool.
e.g: If you have a pool of two disks in mirror (c0t1d0 and c0t2d0), and you got problems replacing the disk c0t2d0, remove it and add another one with this command:
zpool attach poolname c0t1d0 c0t2d0
And the resilver should start automatically. So, you will have a “DEGRADED” pool on the screen, but should have a healthy pool in the background.
Hope that helps.