From owner-freebsd-questions@FreeBSD.ORG Tue Apr 1 07:39:11 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AEE037B401 for ; Tue, 1 Apr 2003 07:39:11 -0800 (PST) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEB4943F93 for ; Tue, 1 Apr 2003 07:39:07 -0800 (PST) (envelope-from kirk@strauser.com) Received: from pooh.honeypot.net.strauser.com (kirk@pooh.honeypot.net [10.0.5.128]) by kanga.honeypot.net (8.12.8/8.12.7) with ESMTP id h31Fd6Pk004775 for ; Tue, 1 Apr 2003 09:39:07 -0600 (CST) (envelope-from kirk@strauser.com) To: freebsd-questions@freebsd.org From: Kirk Strauser Date: Tue, 01 Apr 2003 09:39:05 -0600 In-Reply-To: <20030401143251.GA4560@poecilotheria.netmails.net> (Hari Bhaskaran's message of "Tue, 1 Apr 2003 08:32:51 -0600") Message-ID: <87vfxyw7l2.fsf@pooh.honeypot.net> Lines: 24 X-Mailer: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux) References: <20030401143251.GA4560@poecilotheria.netmails.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: Cloning a jail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 15:39:11 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable At 2003-04-01T14:32:51Z, Hari Bhaskaran writes: > When I need to clone a jail, would a cp -Rp do? I don't know about `cp' (I'm not sure how well it deals with device nodes, symlinks, etc), but yes, making an exact copy of the file structure should result in an identical jail. > Also can I hardlink a tree (outside) to inside the jail? Once you've made a hardlink, the system has no concept of the "original location". Both of the filesystem entries point to a structure on the disk; that structure doesn't refer back to those entries, point to one, and say "that's my parent!" However, depending on what you want to do, using NFS may be a nice approach. You can make a directory and its children read-only to the jail, but read-write outside of the jail. It's also a lot clearer later on that a particular directory is used by several different systems on the same machine. =2D-=20 Kirk Strauser In Googlis non est, ergo non est. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+ibKa5sRg+Y0CpvERAvrEAKCa1/YRYq11p/qRHGFRrsWikueBsgCghwSC CtgY16B0wy/zRKymN2ExDDQ= =LJkY -----END PGP SIGNATURE----- --=-=-=--