Easy way to transfer main zfs pool?

Status
Not open for further replies.

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
Dear Esteemed Brilliant Colleagues -

So when I started up with FreeNAS, I created a modest 5+1 zraid zfs pool with a couple of sub-datasets. Now that I see what can be done with FreeNAS, I want to expand the system and switch the main zfs pool to zraid2.

I do have enough spare SATA ports to create a new 4+2 zraid2 pool in parallel with the original 5+1. But While I know how to do a swap in place to transfer the data from the old to the new (well there's rsync -a /mnt/old/* /mnt/new/), I'm not sure how to convince FreeNas to use /mnt/new when booting.

Once I do the transfer, how do I change the name of /mnt/newname so that it's /mnt/oldname so that all of my shares don't have to be changed? Is it as simple as zfs rename?

So....
Step 1: rsync -a /mnt/old/* /mnt/new
Step 2: reboot into single-user (after disconnecting /mnt/old)
Step 3: zfs rename new old
Step 4: reboot into multi-user

Is it that simple or am I destined to massive failure?


Karen
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's all doable, but I don't know why you'd rsync from old to new if they are both pools.. just do zfs replication which will be *significantly* faster.
 

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
Thanks CJ. I did the transfer using zfs replication (zfs send | receive).

However, I'm having trouble getting my FreeNAS to use the new z2 pool instead of the old z1 one. I rebooted into single user mode, renamed the zpools (using zpool import oldname newname) but when I booted back into FreeNAS, the system had reimported them using their OLD names! My guess is that FreeNAS keeps track using the

My guess is that FreeNAS stores the GPTIDs of the zpools and mounts using them, rather than the names.

Does anyone know how to get FreeNAS to switch?

Karen
 

david kennedy

Explorer
Joined
Dec 19, 2013
Messages
98
Thanks CJ. I did the transfer using zfs replication (zfs send | receive).

However, I'm having trouble getting my FreeNAS to use the new z2 pool instead of the old z1 one. I rebooted into single user mode, renamed the zpools (using zpool import oldname newname) but when I booted back into FreeNAS, the system had reimported them using their OLD names! My guess is that FreeNAS keeps track using the

My guess is that FreeNAS stores the GPTIDs of the zpools and mounts using them, rather than the names.

Does anyone know how to get FreeNAS to switch?

Karen



This is odd as I have done the same thing.

I just stopped the jails, did:
zpool export oldName
zpool import oldName NewName
zpool export NewName
then imported via the GUI without issue.
 
Status
Not open for further replies.
Top