Is it a bad idea to add an additional drive to my zpool mirror while replaceing one of the drive in it?
I have:
zpool
mirror-0
replaceing-0
bad-drive-01
new-also-bad-drive-02
hopefully-verry-good-drive-03
also:
unused-pobs-good-drive-04
All 4 drives are identical.
Is it a bad Idea to zpool attach the new drive, and later zpool detach the ones that do not behave?
Would adding another drive during resilvering add unneeded strain to already flaky disks?
(during resilver i remembered that i had replaced the “new” drive a few months ago since it was throwing errors, and never took it out of the machine. Oops)
Is it a bad idea to add an additional drive to my [two-wide mirror vdev] while replacing one of the drives in it?
Generally speaking, no. You’re just making it a three-wide mirror (unless and until you detach a drive). However, if you’re struggling to resilver because the only surviving disk in the vdev is flaky, it’s a bad idea, because you might overload that struggling drive before it can finish getting its data safely resilvered onto the first new disk you handed it.
But as long as hopefully-verry-good-drive-03 is performing reliably and well, yeah, it’s absolutely fine to zpool attach unused-pobs-good-drive-04 to it, then detach bad-drive-01 and new-also-bad-drive-02. Depending on the actual condition of those bad drives, it might make sense to immediately detach them without even waiting for unused-pobs-good-drive-04 to finish resilvering in (attaching). That way, you get all the read requests going to the good drive, rather than a bunch of them going to bad-drive-01 and potentially stalling or failing and then requiring a fallback to hopefully-verry-good-drive-03 afterward.