I have a bunch of service jails installed on a FreeBSD 8.1 box, installed as per the handbook. I use portupgrade to manage both the base server and all the jails. I thought it would be a good idea to save space and unnecessary re-indexing by sharing the Ports collection of the base server with the jails. I did this by creating more nullfs mounts inside the jails with entries in /etc/fstab like this, one for each jail:
I then renamed the existing ports directory in /home/j/mroot/usr to ports-old, and created a new directory ports for the mount. Everything seems to work just fine- the ports directory for the main box is mounted read-write inside all the jails.
I just have a few questions:
1. Is there a better way to structure this? Symlinks start getting cyclical in this case, so I know I need nullfs mounts, however, if I just mount /usr/ports into /home/j/mroot/usr/ports, it doesn't show up in the jail. I sort of vaguely understand why this is, but I'm not 100%
2. Before I did this, I ran portupgrade in the jails, and it hasn't upgraded anything in quite some time, which I thought was very odd. I thought this might be because I haven't upgraded the jails (which requires a full installworld and a bunch of mergemastering and time) in a while. I'm not 100% on what version information is actually contained in the ports directory, so I figured sharing the ports directory of the base machine (which is updated via freebsd-update nightly) would make sure they all have the latest and greatest information, but this was not the case- portupgrade still has nothing to report. The question is, have there really been very few upgrades available, or is something possibly broken with Portupgrade, or is there something that's missing that doing the full installworld routine would fix?
Thanks for any help!
Code:
/usr/ports /home/j/ns/usr/ports nullfs rw 0 0
/usr/ports /home/j/data/usr/ports nullfs rw 0 0
I then renamed the existing ports directory in /home/j/mroot/usr to ports-old, and created a new directory ports for the mount. Everything seems to work just fine- the ports directory for the main box is mounted read-write inside all the jails.
I just have a few questions:
1. Is there a better way to structure this? Symlinks start getting cyclical in this case, so I know I need nullfs mounts, however, if I just mount /usr/ports into /home/j/mroot/usr/ports, it doesn't show up in the jail. I sort of vaguely understand why this is, but I'm not 100%
2. Before I did this, I ran portupgrade in the jails, and it hasn't upgraded anything in quite some time, which I thought was very odd. I thought this might be because I haven't upgraded the jails (which requires a full installworld and a bunch of mergemastering and time) in a while. I'm not 100% on what version information is actually contained in the ports directory, so I figured sharing the ports directory of the base machine (which is updated via freebsd-update nightly) would make sure they all have the latest and greatest information, but this was not the case- portupgrade still has nothing to report. The question is, have there really been very few upgrades available, or is something possibly broken with Portupgrade, or is there something that's missing that doing the full installworld routine would fix?
Thanks for any help!