computer support

Replacing a failed disk on Freenas 0.7 in a ZFS pool

Yikes, my zpool showed a drive remapping lots of failed sectors. I expect it to fail soon.

However, ZFS was just added in Freenas 0.7 and their are some problems to jump in order to replace it.


0. Do a ‘scrub’ on your zpool to verify pool before turning off the machine and adding the drive.

1. Add a new drive to replace the old one. Use the DISK management tab to add the drive, and make it a ZFS filesystem disk.

freenas adding drive



2. I was told by guides online to use the GUI to flag the old disk as ‘offline’ (using tools->offline->*select bad disk*) then use ‘replace’ and choose the bad disk then the new disk. But this took it offline and I couldn’t replace it. THe replace command would not see the new drive.  So I had to turn the bad drive back ‘online’.  That forced me to step3 – the cli method.

3. Go to freenas executing replace‘Advanced’->’command’ and issue the following command ‘zpool replace bigstack /dev/ad6 /dev/ad8’  which means ‘zpool replace zpool-name failing-drive new-replacement-drive’

This begins xfering data over.  And yes, the failing drive is still online.

(Note, i instead tried to ssh into freenas and issue this as cli but it failed due to sudo issues of some kind)


zpool status replace

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.