Cloning a jail
Axel Gruner
axel.gruner at suedfactoring.de
Tue Apr 1 22:50:48 PST 2003
Hi.
On Tue, 1 Apr 2003 08:32:51 -0600
Hari Bhaskaran <subscr at spider.netmails.net> wrote:
> When I need to clone a jail, would a cp -Rp do?
Yes and no.
To do a exact copy of a jail, use the "cpdup" program (it is in the
ports).
> (and change rc.conf). Or do I have to go through
> the jail(8) steps again? (make hierarchy, install etc).
No. That would take to much time ;). Use "cpdup".
Just change the IP and stuff in rc.conf. Also use a new startup script
on the host system /usr/local/etc/rc.d/ Thats it.
> By 'clone', I meant an identical jail session,
> on top of which I will install other packages,
> not necessarily same on both.
see above.
> Also can I hardlink a tree (outside) to inside
> the jail? assuming I don't mind it being writeable.
> Would it open a hole to the rest of the system?
You can use "mount_nullfs" from the host system.
Or NFS to on the hostsystem. With that you can do a NFS mount from
/usr/ports of the hostsystem to /jail/usr/ports. I do that with my
jails. Works great.
More information about the freebsd-questions
mailing list