[patch] Improved jail fstab functionality inside rc.d (needs testers and review)

Ivan Voras ivoras at freebsd.org
Mon Nov 30 11:51:47 UTC 2009


Merijn Verstraaten wrote:
> My apologies if these are the wrong lists for this sort of thing but it 
> was unclear to me where else to go with additions like this.
> 
> I just finished hacking /etc/rc.d/jail to fix my two pet peeves, 
> currently the rc framework only accepts a single fstab file per jail and 
> (worse!) there is no way to specify the mountpoints in these fstab files 
> relative to the jails root. This makes sharing of mounts (for example 
> all my jails nullfs mounting the same ports tree) very cumbersome.
> 
> This patch should allow you to specify multiple fstab files in the 
> jail_fstab and jail_<name>_fstab variables and mount these in order. In 
> addition the patch mangles the fstab files in such a way that any 
> mountpoint in the fstab files starting with the text "ROOT" will have 
> "ROOT" replaced with the jails rootdir. For example the following 
> situation:
> rc.conf:
> jail_test_rootdir="/usr/jails/test"
> jail_test_fstab="/usr/jails/fstab /usr/jails/fstab.test"

Ah, so you want a single fstab file to be usable for multiple jails, 
which have identical fs structures. Nice idea.



More information about the freebsd-hackers mailing list