From owner-freebsd-questions@FreeBSD.ORG Thu Sep 25 22:04:04 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 670921065687 for ; Thu, 25 Sep 2008 22:04:04 +0000 (UTC) (envelope-from me@davidpolak.com) Received: from smtpauth12.prod.mesa1.secureserver.net (smtpauth12.prod.mesa1.secureserver.net [64.202.165.35]) by mx1.freebsd.org (Postfix) with SMTP id 32D588FC13 for ; Thu, 25 Sep 2008 22:04:03 +0000 (UTC) (envelope-from me@davidpolak.com) Received: (qmail 31229 invoked from network); 25 Sep 2008 22:04:03 -0000 Received: from unknown (97.119.58.64) by smtpauth12.prod.mesa1.secureserver.net (64.202.165.35) with ESMTP; 25 Sep 2008 22:04:02 -0000 From: "David Polak" To: "'Nejc S\(koberne'" References: <005401c91f35$3cf09fa0$b6d1dee0$@com> <48DBF589.3030906@skoberne.net> In-Reply-To: <48DBF589.3030906@skoberne.net> Date: Thu, 25 Sep 2008 17:03:16 -0500 Message-ID: <006b01c91f5a$83c8c360$8b5a4a20$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AckfTg/QdpHX8hMvRy25t8BD4FHAPQAB4WlA Content-Language: en-us Cc: freebsd-questions@freebsd.org Subject: RE: mount_unionfs for jails 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: Thu, 25 Sep 2008 22:04:04 -0000 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd- > questions@freebsd.org] On Behalf Of Nejc S(koberne > Sent: Thursday, September 25, 2008 3:33 PM > To: David Polak > Cc: freebsd-questions@freebsd.org > Subject: Re: mount_unionfs for jails > > Hello, > > > Here is what I am trying to do: > > > > mount_unionfs -o below /usr/jails/basejail /usr/jail/jail1 > > > > after I do that I edit /usr/jail/jail1/etc/rc.conf and add the > appropriate > > entries to the host system rc.conf, but when I start the jail it > starts > > using the settings from /usr/jails/basejail. > > I have the same setup and it works for me. > > > Is my mount_unionfs syntax wrong, is this a bug in unionfs (man page > says > > unionfs is broken, but doesn't specify how its broken) or is this > expected > > behavior? > > It shouldn't be wrong. I have this in my fstab: > > /jail/base /jail/spl/nejcspl unionfs rw,noatime,below 0 > 0 > > (noatime option is completely optional, of course.) > > But, if I were you, I would update the RELEASE to STABLE. This will > also fix > some bugs in unionfs. However at least some other bugs still aren't > fixed in 7-STABLE > to this day (most notably the socket bug, which prevents mysql from > running in a jail > and writing socket file to /tmp/mysql.sock), so we had to MFC the patch > from > HEAD manually. If you need the patch, let me know. > > However, I don't suggest running jails on top of unionfs where you need > decent stability (i.e. in production). I am writing thesis at the > moment which > also covers this topic. We also stumbled upon these issues: > -snip- > > So, you can see that there are (still) many issues with unionfs on > FreeBSD. > Please let me know if you are able to solve your problem. Or else we > can make > this list a little longer. :) > > HTH, > Nejc > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org" Well, it turns out that my problem was due to a typo in my host systems rc.conf. I had duplicated the jail block and used a regex to rename it to the unionfs jail, but missed the directory... Right now, I am just testing things, but if it works, I'l use it. It seems a lot more elegant that other solutions, as long as it actually works. Do you know if there is a way to "reset" the unionfs? I did notice this: fsserver# mkdir dir1 dir2 fsserver# touch dir1/basefile.file fsserver# mount_unionfs -o below dir1 dir2 fsserver# ls dir2/ basefile.file fsserver# rm dir2/basefile.file fsserver# ls dir2 fsserver# umount dir2 fsserver# ls dir1 dir2 dir1: basefile.file dir2: fsserver# mount_unionfs -o below dir1 dir2 fsserver# ls dir1 dir2 dir1: basefile.file dir2: fsserver# seems useful, but where does it store that info in case you need to make stuff show up again?