Adding a third disk to a mirror

keboose

Explorer
Joined
Mar 5, 2016
Messages
92
I built a FreeNas system using two 1TB disks (WD Red) as a mirror. I wanted to extend the redundancy by adding a third (identical brand, size) disk to the mirror. The closest I could get in the GUI is to add the third disk as a hot spare:
Code:
NAME                                            STATE     READ WRITE CKSUM
    tank                                            ONLINE       0     0     0
      mirror-0                                      ONLINE       0     0     0
        gptid/dd20d419-b762-11ea-a4c1-d05099d518aa  ONLINE       0     0     0
        gptid/dd4e8400-b762-11ea-a4c1-d05099d518aa  ONLINE       0     0     0
    spares
      gptid/967217e5-e5af-11ea-89ca-d05099d518aa    AVAIL   

The GUI wouldn't let me modify the existing mirror, which as I understand it, is made up of patitions on the drives (referenced by the pgtid's). I saw this post, which points me in the right direction, but I don't know enough about zfs to confidently say I can figure it out without destroying my pool. Does FreeNas destroy the partition table on detaching a disk? I was thinking I could detatch the third disk (spare,) and add it directly to the mirror via the CLI:
Code:
zfs attach tank gptid/dd4e8400-b762-11ea-a4c1-d05099d518aa gptid/967217e5-e5af-11ea-89ca-d05099d518aa


Would that work if I detached the disk first?
 

keboose

Explorer
Joined
Mar 5, 2016
Messages
92
An update: at some point the UI was updated to allow to extend mirrors past two disks. I removed the third disk as a hot spare, and extended the mirror with it, now the pool is resilvering:

1643596163402.png
 
Top