[NAS4Free] How to replace a failing disk

I am very happy with NAS4Free server so far. Especially the ZFS is awesome!!!

I wanted to test out how easy and fast replacement of bad disk from ZFS RAIDZ2 and also wanted to test this out without reboots. I must say that it went really, really smooth!!!

Here is the procedure:

(My ZFS zpool name is “vault0”)
1. Backup all data – yeah, we say this but never do it…
2. Issue “# zpool status” command to find out the status of the pool and the bad device. In this case, the bad disk is ada2
3. zpool offline vault0 ada2
4. Remove the ada2 from the system – check dmesg
5. Insert the new replacement of ada2 – check dmesg
6. camcontrol identify ada2 – check the drive serial number to be sure
7. zpool online vault0 ada2
8. zpool replace vault0 ada2
9. zpool status
10. wait for the resilvering/rebuilding process to complete.

The best part is the step 10 runs really fast. Previously I used raidframe RAID5 with 2TB disks and comparing to zpool replace process, it is day and night difference in the speed!!!!