Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Sep 2015 21:48:50 +0200
From:      Kozlov Sergey <kozlov.sergey.404@gmail.com>
To:        Raimund Sacherer <rs@logitravel.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: How to convert a physical host into a Jail?
Message-ID:  <55E752A2.6080207@gmail.com>
In-Reply-To: <1191031848.12018409.1441206551674.JavaMail.zimbra@logitravel.com>
References:  <1191031848.12018409.1441206551674.JavaMail.zimbra@logitravel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Raimund,

First, if you're using ZFS for the whole system you can "zfs send"/"zfs
receive" the root dataset to one of the folders, where your jail will
reside. I don't know if that jail will be usable right away or not,
maybe there will be some tweaking required. One thing I'm sure about is
that in jail you won't need any boot-related stuff including the kernel
as jails share it with the host, so you can delete it to save some space
and not to confuse any update tools in the future.

Second, if your jail needs to manage the zfs datasets you can dedicate a
branch of your zfs dataset tree to a jail by using the "zfs jail"
command. Note though that you have to issue "zfs jail" each time you
start the jail (i never used iocage but I bet it has functionality to
run some script after start of the jail) and after you dedicate the zfs
branch to the jail it won't be accessible from the host before you issue
the "zfs unjail" command.

Regards,
Sergey Kozlov

On 02.09.2015 17:09, Raimund Sacherer wrote:
> Hello, 
>
> the first server I set up in our production environment was a backup server. Its FreeBSD 10.0 and I installed our backup server directly without creating jails first. 
>
> Now that I am much more familiar with FreeBSD and jails (iocage) I would like to:
>
> clone (move, sync, ...?) the physical host into a iocage jail
> after the clone works stop and remove the services from the host
>
> Then upgrade to 10.2.
>
> I am not sure on how to correctly move the physical host installation to the jail, also not sure about the correct way for the jail to get to various zfs datasets which our backup server needs. Allow them to mount in the Jail? Move them from where they are to beneath the jail? What are the differences? 
>
> Thank you
> Best
> Ray
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55E752A2.6080207>