Sharing among jails

BSD bsd at xtremedev.com
Sat Jul 26 12:41:27 PDT 2003


On Sat, Jul 26, 2003 at 11:29:06AM -0700, User KATRINA wrote:
> I was wondering if there's a way I can share my main /usr/ports directory
> with the jails I'm running.   I thought this would save me a LOT of space.
> I tried just the standard "ln -s" to the ports directory when I log into
> the jails and try to access the ports directory I get the following:
> 
> > cd ports
> ports: Too many levels of symbolic links.
> 
> Is there a way I can share this directory with my jails.   Someone told me
> to try a hard link but I haven't been able to find the info on how to do
> this, (ln /usr/ports ports returns "ln: /usr/ports/: Is a directory") and
> everyone else says not to use hard links at all.
> 
> Whats the best way to go about sharing this directory with my jails?

IMHO, the best way would be to use mount_union or mount_null (I still
can't figure out what's the difference between them...) of the ports
directory. However, that said, I tried that myself about a year back,
and accesses in the jail caused my FreeBSD machine to lock up solid. So
I guess the warnings in the BUGS section of the mount_union and
mount_null man pages are still in full effect. I do wish these would
have gotten fixed though, they seem ideal for making jails (mounting
nullfs or unionfs on top of a template jail is so much more elegant than
making copies...)


More information about the freebsd-questions mailing list