Freenas migration to new server

preedy

Dabbler
Joined
Dec 28, 2019
Messages
15
Hello, I am new to freenas. I have my freenas server running for 2/3 months and now have all my media on it. As most beginners I jumped in used whatever crap I had.
Now that all my media is on it I am worried about losing data. So created a better machine and I want mirrored drives.

I would like to know the way to switch over to my new machine, with mirrored drives without losing my data.

I have read\watched several tutorials and suggestions, but am worried.

my setup: old machine
Running freenas 11.2-u7
ada0 500gb boot striped ada0p2
ada1 2tb media volume stiped ada1p2

New machine
Running freenas 11.2-u7
ada0 120gb ssd boot

I saved my old config,
installed freenas on new machine,
uploaded config
installed old 2tb drive media

System had no error and was up and running tested several movies worked as well.
worried that in the old system I may have imported the old 2tb and striped boot with media.
Not sure how to check this.

Now I would like to add a second 2tb hd to mirror with 2tb media on the new machine.

method 1
use legacy gui
install old 2tb media and new 2tb
goto storage, choice volume manager
select volume to extend "media"
select available disks "new"
select mirror

method 2
use Shell
  1. gpart create -s gpt /dev/ada2
  2. gpart add -i 1 -b 128 -t freebsd-swap -s 2g /dev/ada1
  3. gpart add -i 2 -t freebsd-zfs /dev/ada2
  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 ada2p2.
  6. zpool attach tank /dev/gptid/[gptid_of_the_existing_disk] /dev/gptid/[gptid_of_the_new_partition]
Will I possibly lose data with either method. method 1 seems easier but I found more individuals using method 2.

Thank you for reading, I hope want I am doing and wanting makes sense.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644

preedy

Dabbler
Joined
Dec 28, 2019
Messages
15
Jeesh, yes and fixed. read it three times and still have mistakes.
thank you.
 
Joined
Jan 4, 2014
Messages
1,644
Do you have a current backup of your data? Personally, I'd have reservations providing you with any advice moving forward if you don't have a current backup. You seem to be playing with fire here.
 

preedy

Dabbler
Joined
Dec 28, 2019
Messages
15
yes, I copied all media to a usb drive.
But I really do not want to go through the setup of emby, jails permission again. That was kind of a headace.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
I don't use mirrors in my storage pools, but I believe method 1 is not a legit approach. When you extend a ZFS volume, what you're doing is striping with a similar virtual device (vdev) to increase the overall size of the pool. Method 2, I'm not sure. The posts that describe this approach appear to be quite dated and I'm not certain of their applicability to more recent versions of FreeNAS. Even if it were still relevant, I'd still be uncomfortable recommending it unless you're extremely conversant working with the CLI (I'm not!) and understand what each line does exactly, and you are comfortable troubleshooting if something goes wrong. It's not a recipe to blindly follow.

In my opinion, your safest approach would be to acquire another 2TB drive; create the mirror on the new machine with the two new drives and then replicate the pool from the old machine to the new machine. All of this can be done through the UI.

It is curious that, in the UI, you can create mirrored boot drives starting with a single working boot drive. I'm not sure you can do that with general storage though? Anyone else care to comment?
 
Last edited:

preedy

Dabbler
Joined
Dec 28, 2019
Messages
15
Ok an update, I went ahead and tried method 1. It would not allow me to mirror.
So method 2 was my only choice, every thing worked great, easy, fast and now I have a new system mirrored.
thank you again for you help.
 
Top