I have a few HDDs to replace in my RAIDZ2 pool as they are SMR drives. As they are not faulty per say I have the luxury of replacing them in-place.
This got me thinking - does it make any difference in resilvering that the drive is present?
In theory, if the drive is healthy then in theory resilvering would be a simple copy rather than ready all the remaining disks. But I do not know if the disk to be replaced, by that zpool replace command is marked dubious?
And this lead me to my next question - are the parity strips in a stripe duplicates or different?
In a RAIDz2 vdev, P1 and P2 are different. They have to be, because you need to be able to reconstruct a stripe even if you lose two data members; you can’t do that with two copies of the same parity data!
Typically, you want to resilver with the old drive in-place, if the old drive is still answering requests reasonably quickly. This isn’t so much to make the resilvering go faster, as to retain your dual redundancy while you resilver. If you pull the drive before you resilver, then you’re down to single redundancy until the resilver op completes.
Replacing “online” (with the old and new disk both connected) is always better. The only time to not do that, is when you can’t (not enough drive slots), or when the failing drive is too far gone (dragging performance down)