ralphbsz said:
man zpool
will do the trick. There is a short section explaining how replace works. It's very easy, the command is just zpool replace <pool> <old> <new>.
No, no, no, no, and no! Do *
not* use "replace" with mirror vdevs. You'll cause yourself no end of issues.
The proper way to replace a failed (or failing) drive in a mirror vdev:
Code:
# zpool attach <poolname> <old drive> <new drive>
<wait for resilver to complete>
# zpool detach <poolname> <old drive>
Doing it this way, you never break the mirror, you never lose redundancy (if <old drive> is not completely dead, anyway), and you don't end up in weird configurations.
"zpool replace" should only be used with raidz vdevs.
If the old drive is mostly dead, then attach the new drive to the working drive in the mirror, wait for the resilver to complete, and then detach the dead drive.
If the old drive is completely dead, then you can "zpool offline" it, attach the new drive to the other side of the mirror, wait for the resilver to complete, and then detach the dead drive.