Solved Convert ezjail to use ZFS with running jails

masteroman

Member

Reaction score: 8
Messages: 30

OK, so I've made an mistake with rushing into setting up Jails and haven't configured ezjail before I started creating jails so it by default created all of the jails within /usr/jails directory which is part of zroot ZFS pool, not its own pool.

To be more specific I'm talking about the following options:

Code:
# grep -iE "ezjail.*zfs" /usr/local/etc/ezjail.conf | head -3
#ezjail_use_zfs="YES"
#ezjail_use_zfs_for_jails="YES"
#ezjail_jailzfs="zroot/ezjail"
I was planning on moving whole jails folder aside, creating zpool and pools for each jail I have within it and then moving data back in. Would that be the correct procedure?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,761
Messages: 30,885

Since this is all new anyway I'd just remove them and recreate them at the correct spot.
 
OP
OP
masteroman

masteroman

Member

Reaction score: 8
Messages: 30

Well, I can't do just that as there are already some sites running within those jails. I mean nothing crucial for few minutes of downtime but I would prefer not to have them built from scratch.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,761
Messages: 30,885

You can also rebuild them at the new (correct) spot while leaving the old ones running. Then transfer the data and switch over when you're done. That will give you the least amount of downtime.
 
Top