Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 2008 09:22:27 -0500 (CDT)
From:      "Sean C. Farley" <scf@FreeBSD.org>
To:        Ivan Voras <ivoras@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: Transferring ports
Message-ID:  <alpine.BSF.1.00.0803130906370.72703@thor.farley.org>
In-Reply-To: <frb0ku$a2n$1@ger.gmane.org>
References:  <frb0ku$a2n$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Mar 2008, Ivan Voras wrote:

*snip*

> The details: imagine there are two or more full FreeBSD installation
> trees in the file system (e.g. complete jails). The utility would
> transfer (installed) packages from one tree to the other. The easy,
> brute-force way would be to generate package files (tbz) from the
> installed tree and then install them to the other tree, but I can't do
> that because of performance and disk space reasons.

I do not know of any such scripts but a possible solution is to use
nullfs.  I personally install all needed ports into the base system and
use nullfs read-only to pull everything into the jails.  Almost
everything, files from /usr/local/etc are manually copied as needed into
each jail.  It lowers the disk usage and reduces risk due to most files
(even system) being read-only.

You just need individual /etc/fstab.<jailname> files like this:

/bin    /usr/local/jails/<jaildir>/bin        nullfs  ro      0       0

And similar lines for these (at least all that you require):
/boot /lib /libexec /sbin /usr/bin /usr/games /usr/include /usr/lib
/usr/libdata /usr/libexec /usr/local/bin /usr/local/cyrus
/usr/local/etc/periodic /usr/local/etc/php /usr/local/etc/rc.d
/usr/local/info /usr/local/lib /usr/local/libdata /usr/local/libexec
/usr/local/man /usr/local/sbin /usr/local/share /usr/sbin /usr/share
/var/db/pkg

A basic jail runs about 9MB (mainly /etc and /usr/local/etc).  Does this
help?

Sean
-- 
scf@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.1.00.0803130906370.72703>