Date: Thu, 25 Sep 2008 17:03:16 -0500 From: "David Polak" <me@davidpolak.com> To: "'Nejc S\(koberne'" <nejc@skoberne.net> Cc: freebsd-questions@freebsd.org Subject: RE: mount_unionfs for jails Message-ID: <006b01c91f5a$83c8c360$8b5a4a20$@com> In-Reply-To: <48DBF589.3030906@skoberne.net> References: <005401c91f35$3cf09fa0$b6d1dee0$@com> <48DBF589.3030906@skoberne.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006b01c91f5a$83c8c360$8b5a4a20$>