From owner-freebsd-questions@FreeBSD.ORG Sat Feb 4 05:59:04 2006 Return-Path: X-Original-To: questions@freebsd.org 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 4DAF916A420 for ; Sat, 4 Feb 2006 05:59:04 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from bravo.pjkh.com (bravo.pjkh.com [72.36.232.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0342743D66 for ; Sat, 4 Feb 2006 05:58:59 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from bravo.pjkh.com (bravo.pjkh.com [72.36.232.219]) by bravo.pjkh.com (Postfix) with ESMTP id 84B3E13C7DC; Fri, 3 Feb 2006 23:59:25 -0600 (CST) Received: by bravo.pjkh.com (Postfix, from userid 1000) id D87E613C7DB; Fri, 3 Feb 2006 23:59:24 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by bravo.pjkh.com (Postfix) with ESMTP id D780D13C7BA; Fri, 3 Feb 2006 23:59:24 -0600 (CST) Date: Fri, 3 Feb 2006 23:59:24 -0600 (CST) From: Philip Hallstrom To: Tim Traver In-Reply-To: <43E43455.50004@simplenet.com> Message-ID: <20060203235456.L3508@bravo.pjkh.com> References: <20060203190008.S61891@bravo.pjkh.com> <20060204011033.GA14566@xor.obsecurity.org> <20060203205216.S62884@bravo.pjkh.com> <20060204032507.GA17397@xor.obsecurity.org> <20060203215206.J1887@bravo.pjkh.com> <43E43455.50004@simplenet.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Cc: questions@freebsd.org Subject: Re: How to share directories b/n jails on 6.0? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2006 05:59:04 -0000 >>>>>> I've got a new 6.0 box and have setup some jails. I'd like to share >>>>>> /usr/ports from the host, to each of the jails. >>>>>> >>>>>> I tried mount_unionfs and while it worked, the box would crash if I did >>>>>> anything intensive (ie. compile a port). >>>>>> >>>>>> Googling around and people say they are using nullfs okay, but the >>>>>> manpage >>>>>> ends with: >>>>>> >>>>>> THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T >>>>>> WORK) >>>>>> AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM. USE AT >>>>>> YOUR >>>>>> OWN >>>>>> RISK. BEWARE OF DOG. SLIPPERY WHEN WET. >>>>> >>>>> >>>>> nullfs is fine in 6.0, and the warning has been removed. >>>> >>>> >>>> Good to know it's cool. I'll start playing with it. The warning is >>>> still >>>> there though... in both 6-stable and 7-current. >>>> >>>> http://www.freebsd.org/cgi/man.cgi?query=mount_nullfs&apropos=0&sektion=0&manpath=FreeBSD+6.0-stable&format=html >>>> http://www.freebsd.org/cgi/man.cgi?query=mount_nullfs&apropos=0&sektion=0&manpath=FreeBSD+7.0-current&format=html >>> >>> >>> Those manpages are out of date. >>> >>> http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/mount_nullfs/mount_nullfs.8 >> >> >> Sweet! >> >> MFC: Remove big scary warning about nullfs state >> >> :-) >> >> I've set it up already and it works great. On Fri, 3 Feb 2006, Tim Traver wrote: > How did you set it up specifically ? > > and is it just fixed in 6.0 ? or does it also work in 5.4 ? No idea about 5.4... For 6... /etc/rc.conf: jail_sandbox_rootdir="/local/jails/sandbox/" jail_sandbox_hostname="sandbox.pjkh.com" jail_sandbox_ip="123.123.123.123" jail_sandbox_exec="/bin/sh /etc/rc" jail_sandbox_devfs_enable="YES" jail_sandbox_mount_enable="YES" /etc/fstab.sandbox: /usr/ports /local/jails/sandbox/usr/ports nullfs rw 0 0 Then once started with /etc/rc.d/jail start sandbox I have this: % df -h Filesystem Size Used Avail Capacity Mounted on .... devfs 1.0K 1.0K 0B 100% /local/jails/sandbox/dev /usr/ports 3.9G 1.9G 1.7G 52% /local/jails/sandbox/usr/ports I also came across this afterward... which I might give a go... http://www.freebsd.org/cgi/url.cgi?ports/sysutils/ezjail/pkg-descr Looks like it null mounts a lot more (ie /bin /sbin, /usr/lib, etc.) -philip