Move the Jails folder ?

Status
Not open for further replies.

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
Hello there.

My Jails folder is currently located at: /mnt/Working/Jails and I want to move it to: /mnt/Storage/Jails

I will need to destroy the Working zpool - i am changing from RaidZ1 to RaidZ2. I have tried to move the folder from the command line following the instructions here: https://forums.freenas.org/index.php?threads/how-can-i-transfer-a-jail-to-another-disk.45505/

I only have one Jail - MySQL but i can't get the thing to move.
The error i am getting this morning is:

[root@freenas] ~# zfs snapshot -r Working/Jails@relocate
cannot create snapshot 'Working/Jails/MySQL@relocate': dataset already exists
no snapshots were created

I don't know if todays error is because i tried to take a snapshot last night. I am a snapshot virgin so be gentle. I have tried to help my self but I am unsure of the correct way to take a snapshot, move and then delete the jail. Any help would be greatly appreciated - it is just a MySQL database to allow different computers to know which videos i have watched and allow resuming on a different machine (using kodi). So it is not a disaster if i have to destroy the pool and start the Jail again but I would like to learn how to move it correctly.
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
I found this -
Snapshot.png

Should i use these snapshots or delete them and start anew ?
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
I got this error:

[root@freenas] ~# zfs send -R Working/Jails/MySQL@relocate | zfs receive -v -F Jails
cannot receive: local origin for clone Jails@relocate does not exist
warning: cannot send 'Working/Jails/MySQL@relocate': signal received

do i need to create a directory for the snapshot to go to ?
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
I would back up the data folder in the jail to somewhere outside of the jail, using rsync.

rsync -a origin new

I would do this with a data set using the same settings as you best can from the current jail. After you have the data, change the default location for jails. Make a new jail with the plug in you want. When it is running with basic config okay, shut it down and move your data in to it. Or better yet, 'add storage' and route the data directory in the jail out to where the you backed the data up.

When it is working correctly, delete or simple remove the old dataset.

It is really a good idea to make a dataset just for the data of jails, and another for their config directory. The you will be prepared for the migration to Dockers. Makes rebuilding jails easier as well.
 
Status
Not open for further replies.
Top