Transform a 3T drive (ZFS) to Raid 1 ( Mirror) ?

Status
Not open for further replies.
Joined
Nov 10, 2016
Messages
7
Hi Guys,
I have a Volume that use a 3T drive right now that has data in it.
Is there a way for me to add a second 3T drive to get a Raid 1 ( mirror ) volume for safety ?
And this without copying somewhere else the data !
Thanks
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
You can do this, but as far as I know, not through the GUI.

Doing a quick search revealed this thread: https://forums.freenas.org/index.php?threads/create-zfs-mirror-by-adding-a-drive.14880/
Let's assume ada0 is your existing disk, ada1 is the new one, tank is the pool name.
  1. gpart create -s gpt /dev/ada1
  2. gpart add -i 1 -b 128 -t freebsd-swap -s 2g /dev/ada1
  3. gpart add -i 2 -t freebsd-zfs /dev/ada1
  4. Run zpool status and note the gptid of the existing disk
  5. Run glabel status and find the gptid of the newly created partition. It is the gptid associated with ada1p2.
  6. zpool attach tank /dev/gptid/[gptid_of_the_existing_disk] /dev/gptid/[gptid_of_the_new_partition]
Test this first in a VM to verify that you understand everything.

Edit: Updated the steps to create the default 2GB swap partition.
 
Status
Not open for further replies.
Top