ZFS: Moving jail from subdirectory to dataset


Active Member

Reaction score: 11
Messages: 128

Hi All,

Happy New Year.

I have installed a couple of jails in two directories inside a dataset say tank/jails/jail1 and tank/jails/jail2
tank/jails is the dataset and jail1 and jail2 are directories.

Now to make snapshot management easier, I have created all my other jails in separate datasets tank/jails/jailA, tank/jails/jailB.. etc.

How can I move the jails I created under the directories into its own dataset i.e transfer from tank/jail/jail1 to tank/jails/jailC.

jailC is already created.



Aspiring Daemon

Reaction score: 245
Messages: 820

Simply copy the files and folders to the mountpoint of tank/jails/jailC. Make sure your jail.conf is updated to reflect the new location of the jail.

You could use "rsync -aAXv source_dir target_dir".


Aspiring Daemon

Reaction score: 382
Messages: 910

Dear Lamia,
should it be possible to achieve the same goal by

1. Change the zfs mountpoint
2. Change the name in the zfs hierarchy by zfs rename?

I must admit that I have not fully understand how zfs behaves or works. If I would be in the situation I would have taken the method you have suggested which matches the workflow of "old" file systems, too.