Moving data to a new set of HDDs

Status
Not open for further replies.

Noctrin

Dabbler
Joined
Dec 27, 2017
Messages
11
Hey guys,

I tried looking for a way to do this, but most threads i found are for other issues. I'd like to do this without losing my jails/vms/backups etc.

I currently have this hdd setup:

1x 3TB hdd
1x 1TB hdd

Striped: 4TB
Used ~1.5TB

I bought 2 3TB drives, and the setup i want to achieve now is:

3x 3TB drives

RAID 5 6TB

I assume there is no way to somehow remove the 1TB drive from the stripe, add the other 2 and build a raid 5 keeping data intact. So i need a way to move all my data to external storage, build the RAID and move the data back.

Is there a guide on how to do this on FreeNAS 11 while keeping everything intact (jails, vm, shares etc)

Sorry for the possible noob question, I'd just really like to do this without losing all the work I put into setting this up! I should've planned better from the start...

Thank you for any help!


----
HW:
Intel i5-2500k
16GB RAM
FreeNAS 11
 
Last edited by a moderator:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Please use the proper ZFS RAID terminology. I think you want to build RAIDZ1 with three 3TB hard drives.

Is there a guide on how to do this on freeNas 11 while keeping everything intact (jails, vm, shares etc)
Not that I'm aware of but I'm not the all knowing. The tricky part is ensuring the GUI recognizes the jails properly I think. But you could backup all your data, including the jails, backup your config data, then destroy your current pool, reconfigure to the three 3TB drives, and then recreate the new pool, then copy all your data back to the pool. You will need to recreate datasets and all of that fun stuff.

I just went through this a few days ago however since I only had a single jail (Plex), I just recreated it. This ensures everything is good and clean.
 

Noctrin

Dabbler
Joined
Dec 27, 2017
Messages
11
Thanks for the reply, that's what i'm trying to figure out, if i can just copy all the data to another drive and then copy it back keeping everything intact. Was wondering if maybe crash plan or something does it, i see you can backup VMs but nothing on jails.

Realistically, any config files or folders i need to look out for if i need to do this manually and possibly how to restore them to link everything correctly.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
if i can just copy all the data to another drive and then copy it back keeping everything intact.
Sure. Create a ZFS pool on the other drive and replicate everything to that. When your RAIDZ1 pool is created, do the same thing in reverse. That will keep the dataset structure and all the other metadata.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Sure. Create a ZFS pool on the other drive and replicate everything to that. When your RAIDZ1 pool is created, do the same thing in reverse. That will keep the dataset structure and all the other metadata.
I don't think he has the drives he needs to do a replication.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I don't think he has the drives he needs to do a replication.
Where is he going to temporarily store the data? If he has (an) unused drive(s) large enough to hold the data, he could do replication as readily as any other means of storing the data. If he just has free space on a drive that's used for other things, you may be right.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I got the impression the data would be stored externally. When I think of that I start to think that the data is stored on multiple products, be it a few external USB hard drives or also adding in another computer system internal drive. But replication is a valid option if the OP can support it.
 

Noctrin

Dabbler
Joined
Dec 27, 2017
Messages
11
Sure. Create a ZFS pool on the other drive and replicate everything to that. When your RAIDZ1 pool is created, do the same thing in reverse. That will keep the dataset structure and all the other metadata.

Awesome, that's what i was hoping is possible, i can grab an HDD out of another computer wipe it and use it for the transfer. Is there a specific way to perform the replication? I shall google it after i finish typing this, the only way i know of is rsync.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You can set it up through the GUI, but that's going to be more cumbersome than necessary. The manual procedure has been discussed a bit around here--you'd be using zfs send and zfs recv.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
With that setup, if you can have all 4 disks in the server, you can do it without any physical disk swaps;
  • Copy existing 1TB + 3TB to new 3TB single disk pool
  • Create new pool with 1TB + old 3TB and new, still un-used 3TB as RAID-Z1
  • Copy data 3TB to new pool
  • Replace 1TB with old data 3TB, thus growing the pool
  • Then remove 1TB or use it for scratch data.
This 2 step copy would likely be faster if the external or other temp drive was USB.
 

Noctrin

Dabbler
Joined
Dec 27, 2017
Messages
11
I might be missing something as i dont quite know how raid-z1 fully works, but i assumed all drives must be of same size, ie: i cannot have 3tb 3tb and 1tb. And if i was able to do that, i dont think i could remove the 1tb from the RAID and replace it with a 3tb?
 
Last edited by a moderator:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
i assumed all drives must be of same size,
You assumed incorrectly. However, (1) you'd need to use the "manual setup" button in the volume manager to do this, and (2) if you did set up a pool this way, it would have only 2 TB of usable space until you replaced the 1 TB disk with the 3 TB disk (at which point, it would grow to 6 TB).
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Drives can be replaced with other drives that are at least as big. So yes, a 1TB drive can be replaced with a 3TB drive, although only 1TB of that new drive will be used. If, however, all of the drives in a vdev are replaced with larger drives, the vdev automatically grows to use the new smallest drive size. So replace three 1TB drives with a 2TB, a 3TB, and a 4TB, and the vdev treats it as a three 2TB drives.
 

Noctrin

Dabbler
Joined
Dec 27, 2017
Messages
11
Just in case anyone finds this --

I performed the swap by using an extra drive, this guide for reference -- https://plone.lucidsolutions.co.nz/.../zfs-freenas-migration-of-data-to-a-new-zpool

I had to diverge from the procedure,

I copied the original pool to a new pool i made using a 2TB drive.
I could not unmount 'current' pool, instead:
  • Shutdown Server
  • Remove 2 drives for old pool
  • Start server
  • Rename newly created pool to old pool
  • Reboot server
  • Delete the name of the temp transfer pool i used
  • Use old 3TB drive (had to format from shell using DD, the interface would not let me) + 2 new 3TB drives and create the new pool with redundancy, then perform the steps again.
All my jails, VM and time machine backups are perfectly intact, the only issue i have is i see the OS attempt to mount the old 2 drives i had in there previously on boot, but it doesn't cause any problems.

My motherboard only had 2 SATA so i bought a pci-e card with 4 sata ports, my psu also only supports 3 drives, so i had to power the 4th from my desktop while i did the transfer. Fun times!
 
Status
Not open for further replies.
Top