Changing from one primary ZFS volume to another?

Status
Not open for further replies.

Zon

Cadet
Joined
Aug 2, 2014
Messages
8
I am migrating from one primary ZFS volume to another on my single FreeNAS server. There's a long story on why involving migrating from pilot storage pool to production storage pool with different HDD configuration. There will be an overlap period where both volumes will exist on the same server, but eventually the current primary ZFS volume (where the system dataset and jails reside) will go away and the new primary volume will take over these duties.

I can get the data copied between these volumes easily enough. My concern is the system dataset and the jails (two). I know the web GUI has no ability to copy these items to a new volume (right?), and mucking around with the config behind the GUI using the command line is not recommended. However this is a one time operation to save me a lot of repeated configuration steps on the new volume.

Can I get away with:
  1. Stop the jails.
  2. Copy the .system dataset on the old volume to the new volume.
  3. Copy the jail directory on the old volume to the new volume.
  4. Change the System dataset pool in the web GUI from the old volume to the new volume.
  5. Change the Jail Root in the web GUI from the old volume to the new volume.
  6. Restart, and enjoy the bliss of jails and system dataset pool picking up where they left off on the new volume!
  7. Delete old volume and all works perfectly!
Any major gotchas with this? Is there any other configuration information that needs to either be copied or changed?
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
You should be able to move the system dataset via gui.. As for jails I believe but am not 100$ that will work.. But that is what I would do.. Worst comes to worse you'll have to setup your jails again..
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The jails are datasets, so it isn't as simple as copying the directories. The best way I know of to accomplish what you're looking for goes something like this:

* Create new pool with new disks
* Use ZFS replication to replicate old pool onto new pool
* Detach both pools, and physically remove the disks for the old pool
* Using the CLI, rename the new pool to the old pool (zpool import newpoolname oldpoolname; zpool export oldpoolname)
* Import the new pool through the GUI
* Profit!
 
Status
Not open for further replies.
Top